Carl Frampton won the European super-bantamweight title with a stunning ninth round knockout victory over Kiko Martinez.