Move .ident handling to MCStreamer.

No functionality change, but exposes the API so that codegen can use it too.

Patch by Katya Romanova.