Thick fog will envelop parts of Dorset overnight and into Thursday morning with the Met Office issuing a weather warning.