How did we get here?

Blackberry is to end production of its handsets. The BBC's Chris Foxx takes a look at its history.