Refactor RPC handleMessage function

Refactor to be more readable.

Jira-issue: WP-684
Add test for callback obj onSecurityError handling

Test if SecurityError response for RPC callback object causes
onSecurityError to be called. Used by ServiceDiscovery.

Jira-issue: WP-684
Bump version to 0.8.0-3

Jira-issue: WP-684
Merge pull request #6 from aldafu/WP-684-refactor-handleMessage-func

Wp 684 refactor handle message func