Lots of tests for the new multiblock template syntax and some fixes and improvements in the template parser code.