add marshalJson for metadata, and extract the logic to set metadata without registering.
fix the MarshalJSON method signature
add test for marshalling
Merge pull request #13 from jianfeiliao/master

Allow setting metadata before registering to Eureka