general: fixed a few botlib defects

From ioquake:
- fixed bad shift
- fixed overlapping buffer in memory
- fixed unused variable
mod: code cleanup

- fixed missing comma
- fixed variable written twice
- fixed TransposeMatrix swapped arguments