handle multiple onentry/onexit

Forgive the half-baked pull request: I just changed scion.js and didn't minimise or add tests. Anyway, the code currently doesn't handle multiple <onentry> or <onexit> elements, and this request addresses it.