Issue #915: resource expressions that are instantiations must be Destroyable; otherwise resource expressions must be Obtainable.
Issue #915: Move the test for whether an expression is an invocation and make it public so that it can be used by the backends.