Merge inventory_get_typed_object and inventory_get_object

This will allow to simplify the CALL_* macros in api.c.