Code quality improvements for NGSI Event Broker

#### Reviewers
@jesuspg @flopezag 

#### Description
Related to issue #24

#### Testing & coverage
Better coverage and rules compliance, lower tech debt ratio.

It has been moved to the header (.h) file, as with the rest of functions.