Migrate OS-socket funcs to amqp_socket.[ch]

Doing this for code clarity, as its easier to see what the issues are
when you have all implementations in one file