function createWithFirebaseAndDispatch(firebase, dispatch, dispatchFirst) {
  return (func) => (...args) =>
    func.apply(
      firebase,
      dispatchFirst
        ? [dispatch, firebase, ...args]
        : [firebase, dispatch, ...args]
    )
}
Function that builds a factory that passes firebase and
dispatch as first two arguments.
@param {object} firebase - Internal firebase instance
@param {Function} dispatch - Redux's dispatch function
@param {boolean} dispatchFirst - Whether or not to have dispatch argument first
@returns {Function} A wrapper that accepts a function to wrap with firebase
and dispatch.