Generalized `alongside` using Ryan Ingram's trick as in `lens-family` 1.0

* http://twanvl.nl/blog/haskell/cps-functional-references#comment-comment0)