What is the difference between militancy, insurgency and terrorism?

This could be a question for MAINS, I believe?