Added support for dgram sockets.

There are two main differences preventing carrier from being used with dgram-based sockets: 1) dgram doesn't support the setEncoding function, and the event that is fired on a message is different (along with the arguments passed). This patch aims to allow carrier to be used interchangeably between net and dgram sockets by 1) only calling setEncoding if it exists, and 2) listening for the appropriate event and firing the 'line' event with all of the passed arguments.