Global existence and global nonexistence of solutions to a wave equation with nonlinear damping and source terms