Issue 9480 - Template name should be stripped of parameters in JSON output

http://d.puremagic.com/issues/show_bug.cgi?id=9480

This will require a rebase after #9484 is pulled (they both modify the same test-case).