Don't compile all partials at once

Compile only the partials that a given template needs. For an app with a lot of complicated templates, this can improve performance -- especially for older JavaScript engines.