More preparation for TIP #494 compatibitly. Add 2 utility functions, which can retreive big strings and ByteArrays without length overflow.