Misc cleanup of test runner and .d.ts files

This is some prep work for an updated version of tsc.js that is a little more strict in a few places.