Added 'locals' option, cleaned up the 'compile' helper a bit.

Before, the `options` object was passed as the locals. I've added an explicit `locals` option, which can be either a function or an object.

One thing to note: If someone was relying on the locals being the `options` object, he will have to update his config accordingly.

I'm not sure how to add an example for this option, as it would require its own jade file.