Fixes for PHP 5.3.

+ Incorrect variable and class contexts.
+ Retrieving element of array returned from function directly, without local variable.
Merge pull request #115 from leftclickben/PROV-913_FixesForPhp53

PROV-913: Fixes for PHP 5.3
Merge branch 'master-fix' into develop
Merge branch 'develop' of github.com:collectiveaccess/providence into develop
PROV-939 Added method to get type; used by revised get()
PROV-943 Make database driver default mysqli and change SqlSearch to know about drivers other than mysql
Merge branch 'develop' of github.com:collectiveaccess/providence into develop