This makes it possible to have a full MachineConfiguration object
referenced from a Machinetemplate
CIMI models: add a MachineCreate model
Move the logic from Machine.create_from_json and Machine.create_from_xml
into MachineCreate
CIMI: Initial addition of attribute validation for CIMI models

This addition will make possible to specify the 'required => true'
option for all attributes in CIMI models, like:

class Machine < Base
  text :name, :required => true
end

To run a check if the instance of Machine is valid or not you can do
following:

Machine.from_xml(xml_body).validate!

This method will raise the CIMI::Model::ValidationError exception if
attribute marked as 'required' have no value set.
CIMI: Capture the validation errors and advertise them as HTTP 400

In case when client sent scrumbed XML or JSON body, this patch
will make sure we send 'HTTP 400 - Bad Request' back instead of
horrible looking 500 error.

This patch also properly advertise the ValidationError in case
when client want to create CIMI resource but the validation conditions
are not met.
CIMI: Initial inclusion of CIMI action models

The way of how we currently create CIMI entities is not
really nice. We parse the raw JSON/XML and then we are
trying to create the CIMI entity.

Besides the code looks ugly, there is no way to add validation
for required attributes without make it even more uglier.

Then in MachineTemplate model, we can leverage the '.from_xml' and
the '.from_json' methods to create the action model and then use it
to create the CIMI entity (MachineTemplate in this case)
CIMI: Tests for CIMI validation in MachineTemplate model
Core: Fixed JSON and XML serialization of realms
Core: Add custom message option for report_error()
CIMI: Replaced :grab_content_type helper with :current_content_type

In Sinatra helpers have direct access to the 'request' method,
so there is no need to pass any parameter to this helper.

This patch will also report unsupported media type correctly
via Deltacloud exception handler with proper HTTP status code.
CIMI: Added validation for 'ref' attributes

- Added MachineTemplateCreate action
CIMI: Added more EntityCreate models for CIMI

- AddressCreate
- AddressTemplateCreate
- CredentialCreate
- CredentialTemplateCreate
- MachineImageCreate
- NetworkCreate

As part of this patch, all 'create' operations were moved
to these EntityCreate models.