Fix find_resource API controller compatibility against 1.7
Fix stub around foreman_url for 1.7+
Add functional tests