added inlines to avoid linking errors

When ros.h is included in multiple files, non-inline functions that are
included with it will generate multiple definition linking errors.
Inlining them solves the problem.
tiny fixes to avoid warnings (and potential bugs!)
De-registration of subscribers and service clients.

This prevents callbacks to be called even when a client program
terminates a connection.
Merge branch 'fix-unsubscribed-topics' into all-fixes