Gem licenses should be exposed via the API

RE: #587, added licenses to the payload structure and written some tests to verify.