Add synchronize_port implementation

I added a synchronize_port implementation that wraps the base class implementation and adds some extra logging around it to catch spurious race-condition errors in the database when updating ports in the sync thread.