Parse contacts json by implementing UnmarshalJSON on types.

I think this method can be made even prettier but I mainly focused on
moving the existing code to UnmarshalJSON. At least the code that uses
the data is pretty now!