Correct override_urls check in Api (closes #692)

This applies the same change which #516 made to Resource to only issue the
deprecation warning when override_urls() actually returns something.

This also changes the logic in both locations to avoid calling override_urls()
more than once