Add if flow

Adds something similar to what is discussed here http://joseoncode.com/2012/06/24/messing-with-cps-in-js/ and what we talked about https://github.com/Clever/clever-common/pull/68

Allows us to write that code to https://github.com/Clever/clever-common/pull/69
this might be a good place to try using spies (http://sinonjs.org/docs/) to ensure that the correct functions are called with the correct arguments (and functions that shouldn't be called aren't called). there are examples in some of the other tests in this repo