Refactor patcher code as static "plugins"

There's little to no benefit to using shared library plugins for this
project and it's a bit troublesome when the library is used on Android.