Move API content-type validation to a decorator
Move API content-type validation to a decorator

Previously, we were using the following snippet of code in all
API functions that required a JSON content-type:

if request.headers['Content-Type'] != 'application/json':
  raise InvalidUsage('Unsupported Media Type, use JSON', status_code=415)

We can do better if we use a decorator to wrap all those functions.
Also, do not assume there is always a content type and use the
get() method to avoid tracebacks.

Change-Id: I6be022239bf864ec69491647e4bf52fa9b063ec4

openstack-packages/DLRN,openstack-packages/DLRN,openstack-packages/delorean,openstack-packages/delorean