Critical behavior of a quantum chain with four-spin interactions in the presence of longitudinal and transverse magnetic fields