Leray-Schauder type alternatives and the solvability of complementarity problems