gh-935

**not ready for merge**

Right now this takes care of generating the right output format - consuming it is another matter
Yeah, this whole thing is kind of tricky. At the moment, we expect `ractive.template` to be an array of item templates and `ractive.partials` to be a map of partial names to one of a) string, b) array of item templates or c) a function. But `Component.defaults.template` could either be a) a string-returning function, b) a `{v:1,t:[...],p:[...]}`-returning function, or c) `{v:1,t:[...],p:[...]}`.

In other words `ractive.template` and `Component.defaults.template` aren't the same sort of thing, and that introduces a bit of confusion (at least in my mind!). I did wonder if - since no-one ever needs to access `ractive.template` - we should rethink how 'setup' data like that should be stored, so we don't face these ambiguities.