machine: move symbols referenced by shared code from main to shared file

With --enable-address-sanitizer we get:
  machined-dbus.c:228: undefined reference to 'manager_add_machine'
build-sys: link most internal libraries statically

Libraries and tools, both use shared symbols wich have global state
and should only exist once in the final image.