WIP: Make SequenceGenerator functional again.

This involves bunch of changes in the core to be reviewed by @bartvm.

This is work in progress: I have not yet even touched documentation, for instance. But most of the stuff is there.
What do you mean by twice? It tags inputs and outputs of initialization routine, which should be done as it is an application method.