Replicated knockout definitions for compiling with AMD modules

Compiles in TypeScript 0.8.3 and will probably compile in 0.9.0 final (as of TypeScript 346c054bba830d566bc18c1e998cde327704fee4 it throws up when the template section at the bottom is included).

Haven't done any tests or anything.