Convert ext/mysql to HNI

Part of #1480

Also includes the commit in #2024
Sorry, where? I don't see that.

It also seems like the issues FB was seeing are a general problem with Native("ActRec") not properly freeing locals.