Convert ext/mcrypt to HNI

Part of #1480

The revert is my workaround for #1738, so probably shouldn't be merged. I'm just keeping it in here so I don't have to keep reverting it when something breaks in the tests ;)

Also adds a rasie_deprecation() function and changes raise_message() to call that for deprecation notices rather than a plain notice.