Allow specifying a custom charset for a multipart Attribute

- Fixed #2025
- Adapted from @BabyDuncan's pull request: #2031
- Overall ugliness clean-up
codec-memcache: increase default buffer size and only encode extras if set.
[#2041] Make PlatformDependent.isRoot0() work on solaris
Merge remote-tracking branch: upstream/master