Fixed the scoping on a bunch of entity_record_dao functions, due to php 5.4's $this var being accessible within closures. (and in the tradition of PHP, it's inconsitent, and does not have support for self:: or parent:: or static::)