Make samples more generic

I replaces kbhit, cgetc stuff with 5 sec sleeps. I also added lots of generic tgi primitives. This version should run on any tgi platform. There are no Lynx specific stuff or palette tricks.