Add AST type definitions to handlebars.d.ts

Also put a module around the "SafeString" type to fix the compiler error.