Fix invalid pointer dereference in AsciiFormatter.

Using a temporary object with strtol() makes the end pointer that it
sets invalid after the call.
Fix malloc/delete mismatch.
Fix global opaque val segfault, addresses BIT-1071

The opaque types need to be created before scripts are parsed.
Merge remote-tracking branch 'origin/fastpath'

* origin/fastpath:
  Fix global opaque val segfault, addresses BIT-1071
  Fix malloc/delete mismatch.
  Fix invalid pointer dereference in AsciiFormatter.