HTTP response format continued

@jehiah noticed that we didn't update `nsqlookupd` HTTP response formats in #330

took advantage of the opportunity to make the code a little more modular and reusable
Yea, I got it wrong on the first pass - see http://en.wikipedia.org/wiki/Internet_media_type#Vendor_tree