[TAV 307] Fix gem dependencies.

Due to not really understanding how all this stuff worked where rails engines
are concerned at first, dependencies and requires were inconsistent and all over
the place. Now fixed.
Improve embedding machinery.

Using a session cookie was confusing the system if the same user hit a page with
an embedded workflow and a normal one.

Solution is to mark a run as embedded in its model as once a run is embedded it
can always be treated as such. Embedded runs will be cleaned up agressively so
won't hang around in the list of runs anyway.