Field definition discovery.

Add some way to describe the field definitions to the API clients.
we'll need to take care in entity related stuff to check if user has access to the public_field, so we don't expose fields that user can't actually change (+This might be complicated, and I'm not sure how to tackle, as for example a user may be able to create field ``foo`` but not edit it).