Add MACContext and switch HMAC and CMAC to use it.

Fixes #1319.

Thoughts?
This needs to be registered as both for backwards compatibility.