Completes issue #3

added type IDocumentFactory, which is implemented now by Collection.
cursor has a new property DocumentFactory, which can be set to a collection in order to provide document objects from cursor results (automatically applied via the next() method).
fixing some styling of if statements...