Implemented: Create type using user defined options.

If a type is not available when creating a document, it will be created using user defined options (like a mapping).
Merge pull request #9 from liip/create-type

Implemented: Create type using user defined options.