Rewrite the dispatcher to work correctly with .spt

Add dispatch_table_{test,data} for easier test specifications
Added a 'testf' target to the build file that stops on the first test failture
Fix resource-type dispatcher