Implement FriendlyId into API

This is to have better support with Rails, since using strings as object IDs has some issues.
ID is changed to integer and handled internally, and we use FriendlyId as ID for the JSON API.