Fix invalid call to $this->xpdo->log()

in xPDO->getCriteriaType()
Fix xPDO::getInstance() when reusing existing

if getting an existing instance without indicating an $id, calling key(self::$instances) would fail because you cannot pass self::$instances by reference since it is not a variable
Fix xPDO::prepare() sending no driver_options
Fix undefined constant object in xPDO->toCache()
Fix xPDOIterator->next() using void return value
Various documentation corrections