While elections grabbed headlines in many countries across Africa this year, military interventions and coup attempts were another major political theme.