Move most of the core graphics in /lib, and remove a lot of retained mode stuff.

Signed-off-by: Rick Taylor <rick@tropicalstormsoftware.com>