Lowenergyscanner example improved

Error handling improved, code styling improved.

Change-Id: I1f35c6a6ef9641cb445fdbe55e0127b554e50ebc
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>