A class to allow pushing and unshifting tasks onto a stack