[QRS detection] Code refactoring and logger introduced

* Change:
  - Logging module introduced.
  - Assertion methods implemented.
  - Some functions extracted to new module - arithmetics.

Signed-off-by: Dusan Kostic <kostic.dusan1990@gmail.com>