refactor Loader, add System, optimize GetKey

Loader now provides its own libraries as well as possible.
System is now added, though currently it only handles getting the time
from the system's high-resolution timer.
GetKey has been given some mild optimizations related to the partial key
handling, using a list that is passed by reference rather than a string
that is fully copied once per call.