Higher-order Melnikov functions for single-d.o.f. oscillators: Theoretical treatment and applications