Extended test functionality quite a bit. Now gracefully exits on test finish. Set up QID for test creation to prevent users from creating tests over and over with the same content. Added several functions and constants to commondefs.php. Functions mostly involve validation; constants are regarding crashlog, log, and seedfile prefixes.