Fix compiler warnings

I attempted to build moveit_ros from source with rather strict build flags (many -Werror settings + cppckeck static code analyzer). This PR gathers the more relevant issues that surfaced. I opted for multiple commits to identify fixes by type and facilitate review. If the review is successful, I could squash them together if you prefer to keep the repo history succinct.