Fixed memory leak in socket binding and SO_REUSEADDR.

Change-Id: Ia6b445b4f7e60c5211c04211fa4a9497b8cc54df
Error logging and reporting in remote control.

Change-Id: I38f71b49b9e30fd7c36cbdbe7313ab7ebdef3e12