finally fixed up quicksort so it works, also fixed nth and last for use
in lisp

I mostly had to add a bunch of tests to qsort to catch NIL's and the
like.

As for nth and last the versions I had were written for use in c so I
just wrote lisp wrappers to do typechecking before calling them. I also
added bounds checking for nth