Invertibility theory for Toeplitz plus Hankel operators and singular integral operators with flip