Add API resource for requests
Only register new endpoint if service has an endpoint field

When a new service is created with a POST request, a new API endpoint
is only created if the service contains an endpoint field with the
name of the endpoint to create
Globally define item and resource methods
Add schema for facilities
Add facilities resource
Add resources schema
Add resources resource
Create main method for API
Fixup facility_schema
Fixup resource_schema
Add hook to register resources for facilities

Introduce register_resources as generalization of register_services
to be able to deal with different types of resources.
Rename delete_resource funtion to delete_documents
Make api a package and import public methods