Fixes #6971,bz1085417 - api handle nonexistent id

In capsule and product APIs, the show action for a nonexistant id fails
to give a proper 404.

for example /api/products/123123 where product 123132 does not exist
product gives 500 no resource loaded

capsule gives protected method `resource_name' called for
You can also re-write it as `unless @product`