add context support

This will allow a user to pass context, either an object or function, that will be used in the template engine.