Inelastic collisions in an ultracold quasi-two-dimensional gas