sim sensors: avoid divide by zero in magOffsetEstimation
watchdog: clear wdg backup register during init

Using the PIOS_WDG_REGISTER slot in the backup registers is
a useful debug tool but it is important to ensure that this
state cannot influence the watchdog behaviour on future reboots.

Specifically, if a future boot removes one of the modules that
was previously watched by the watchdog, we don't want that
removal to endlessly trigger a watchdog.

F1 variant was actually clearing the flag, but was actually
doing it *before* caching the value for debug purposes.  F3/F4
variants were carrying state across a reboot which is bad for
the reasons listed above.
Merge pull request #724 from solidgoldbomb/sim-fix-nan-attitude

sim sensors: avoid divide by zero in magOffsetEstimation
sim-posix: align some sim copies of drivers to match real drivers
sim-posix: use real pios drivers whenever possible instead of copying
sim-posix: remove all unnecessary copies of pios drivers
sim-osx: remove all unnecessary copies of pios drivers
sim: align osx and posix sim driver variants wherever possible
sim-posix: misc makefile cleanup
sim-osx: use real pios drivers whenever possible instead of copying
sim makefiles: align makefiles between osx and posix sims
sim: provide missing definition of pios_com_debug_id
sim: provide weakly linked versions of external sim
pios tim: uint32_t -> uintptr_t
pios rtc: uint32_t -> uintptr_t
pios com: uint32_t -> uintptr_t

This change makes the code work for 64-bit compilations
as well as 32-bit (i.e. sim).

The lower drivers will be updated in separate commits
pios tcp/udp: uint32_t -> uintptr_t
pios usart: uint32_t -> uintptr_t
pios rfm22b_com: uint32_t -> uintptr_t
pios usb: uint32_t -> uintptr_t