Converted HTML5FS to TypeScript.

THIS TOOK SO LONG. I think I found a bunch of bugs, too; I double checked against the standard a number of times to verify.

I won't be able to tell if I've broken it until I start running tests.