Mumbai plotter Headley tells court of earlier failed attacks