added continue_when

Since continue_when entangles feed and mark very tightly we get
ciruclar dependencies. I worked around this problem by factoring
out the code that is called on the incomplete type in stand alone
functions in the detail namespace. This allows me to declare
prototypes that take only references (where the type must not be
complete yet) and run the code in a function that I can be sure has
all the code inside.