Improve support of primary keys
This splits primary keys across "automatic" primary keys (handled by the
database) and manual primary keys (managed by the user). Use the opportunity to
improve/clarify the documentation of field metadata attributes.