Type guards should not affect values of type any

This PR changes type guards to not affect values of type any.

Fixes #1426.

The TypeFlags.Structured flag is set for a union type regardless of the state of the flag for each of the constituent types. The isStructuredType performs the deep check. In the case of narrowing we only care about the shallow state (e.g. you can narrow a union of primitive types).