Simple security for TCP and UDP line receivers.

Addition of support for a simple plaintext 'key' in the line and UDP receiver services, the presence of this key acts as a simple means to prevent unauthorised or unwanted metric sources from using these services. For better security, please consider using AMQP.

I'm currently using this in a production environment. I opted not to mangle the metric path. 
Most of this block is duplicated and screams for a small method. Would you mind?