Semantics self vs static, and _map function update

As the static keyword refers to the class that is bound using late
static binding, and self to the current class, I have updated references
to the $db variable to use self instead of static.

Also, the _mapCollection function has been simplified to the _map
function so that it is usable for the findOne method.