Adds collection handling when an indexed array is returned.

* create.post will always contain 'resource' and 'collection parameters
* 'resource' is null if a collection is created
* 'collection' is null if a collection is created
* a collection response as per getList is returned for a collection POST
Merge branch 'allow-create-collection'