Do NOT ignore MetadataData payload in putExtendedMessage

Also fix -Wall suggestions.
Add defaultKeepAliveTimeout constant
More informative error messages in metadata parsing