Fix more issues from FindBugs
Add note to explain duplicate code path.
Fix setCorrelationId calling setMessageId when the passed value is null.
Also simplified the set correlation from bytes method to make findbugs
happy.
Check for the correct delegate type
Fix a number of minor issues reported from FindBugs.