Improvements to object substitution and filter/object parsing

This PR is for code review.

This optimizes the substitution of objects into types by not traversing types where the object would not get substituted anyway. Currently, the object is incremented by the argument count for recursive traversal of `arr` types, but Vincent and I have concluded that this is essentially a no-op.

This also adds some support for identifier objects in user-written filters for function types.