GetRefAPI mostly done

The functions required by the GL dll are mostly finished. The only one
not filled yet is the VID_MenuInit function, which is 200 lines of code
to save for later.