Fix resource building with 'singleton' and 'through' options.
Working around a SQL Injection Vulnerability CVE-2012-5664

Dunno if Eloquent is impacted with this vulnerability.
Just in case id parameter is always converted to string.
Fix 'findBy' option in ControllerResource class.
Port tests for ControllerResource class is finished!