Private namespace cleanup and safer typecasts in units

All units now use inline functions to typecast A2_unit into the
respective instance types, adding at least a tiny bit of compile
time type safety.

Also cleaned up the static function naming conventions a bit.
Private unit functions are now prefixed with the name of the unit
instead of the former concatenation of "a2" and some cryptic
acronym.
Renamed a2_Tap()/a2_Insert() as a2_Set*Callback()

More descriptive names, and these are advanced, infrequently used
calls for native compiled languages only (callbacks running in the
engine realtime context), so no point in polluting the namespace
with short, nice names for stuff like this...

Also documented the callback prototype, including the previously
completely undocumented (AFAICT) "detach" call that's made when
a callback is replaced or removed, or the hosting xinput unit is
destroyed.