Assign a unique id to every Sock object. #3568

Every new Sock object is now assigned a unique identifier (an integer),
useable by the audit log to relate messages for a given connection.
The identifier is retrieveable via the new method getUniqueId().