Add MACContext and switch HMAC and CMAC to use it.

Fixes #1319.

Thoughts?
It's fine for an implementation of an interface to have extra public stuff, I think we should leave the `algorithm` attributes alone, adding the `verify()` is fine.