Repeat fix + functionality extended

- Repeat now re-uses the existing DOM parent element instead of
replacing the to-be-repeated item with a DIV. This allows us to e.g.
repeat a "tr" inside a "table". Not sure if this will break anything though.

- After creating the repeated elements, attach event handlers to these
new elements specifically so that changes are propagated automatically.

- Added the possibility to dynamically evaluate JS inside a repeating
element, syntax: $${code}, e.g. $${key + 1} will render the list items
1, 2, .. (To make calculation easier I'm now converting the array 'key'
(index) to an int)