Dynamic arrays in codegen

This branch doesn't contain much, just two additional templates and some example code that uses them. They'll probably require modification before they get used (by Monitor and Synapses), but these modifications don't relate to the purpose of this branch which was to investigate using dynamic arrays in codegen so it would be better to merge this now to have the example code there, and do those modifications in other branches.

Resolves #62