nsqd: use metadata struct for both marshal and unmarshal
Metadata marshaling currently is done via a map containing untyped interfaces, which is unfortunate given that the code also contains a meta type used during unmarshaling.
This commit elevates the old meta type a bit to be used during both operations. The changeste also exposes a GetMetadata method to return the same metadata type without pushing it to disk. This is useful for use cases where NSQD is embedded into another Go program and some introspection is needed.
Hmm, I've seen that I can list all the topics by specifying "" for nsqd.GetStatus, so maybe this PR is not that useful at the end of the day. Still, might be a nice code cleanup to use a data struct on marshaling too vs. making a map of interfaces.
updated this myself