Improve encapsulation of native connector interfaces

- Inject NativeMetadata into NativeConnectorFactory, just like DataStreamProvider et al.
- Make NativeSplitManager depend on the connector-specific NativeMetadata instead of global Metadata
Fix state inconsistency in StateInfo

Read stage state first when creating StageInfo
Change StateMachine to be based on equality not identity
Change StateMachine to not allow nulls
Deep copy TaskInfo outputs in constructor to avoid ConcurrentModificationException