Fixed an issue with resizing of MANAGED_POINTER when converting a STRING_32 into a UTF-8 or UTF-16 encoding. To simplifiy resizing, if we need to resize the managed pointer, I actually calculate how many bytes I need at least (it could be less when using escaped strings) but that way only one resizing is performed.

For UTF-16 encoding taking a `p_offset', to let us write postconditions that makes sense (since extraction from UTF-16 requires a code unit position and not an offset), we enforce that `p_offset' is always even. 

Added a postcondition for all conversion routines that helps in verifying that the implementation is correct.

See review#9157001.


git-svn-id: https://freeelks.svn.sourceforge.net/svnroot/freeelks/trunk@684 6d4a7a74-6026-0410-acef-abb7cea3cd6d