Schalke boosted their survival hopes by inflicting just a second defeat of the season on Bundesliga 2 leaders St. Pauli.