Completely refactored the packet parsing.

The packets arriving from the Sphero are now parsed by a statemachine
that should give more readable code.