lsm303: make code alot more robust and fix getHeading() call

Note that from this UPM release libmraa 0.5.2+ is required

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>