Simplify message data handling when building MIME message.

Use Horde_Stream, only convert in one place, reduce memory usage.

Conflicts:
	framework/ActiveSync/lib/Horde/ActiveSync/Imap/Adapter.php
phpdoc
Use Horde_Stream_Temp
No need to dereference the stream, Horde_Stream can handle it.
Still need to return a resource.
Use Horde_Stream methods.
Horde_Stream#getString() does not work the way I thought.
Use Horde_Stream

Conflicts:
	framework/ActiveSync/package.xml
Typos.
More places to use Horde_Stream
Horde_Stream#read() doesn't exist
Typos
Another typo
Fix merge.
Horde_Stream#substream() feels more natural here.
$this->_decoder->getStream() returns a Horde_Stream, not resource.

Bug: 12727
Bug: 12730  Correctly clear mailmap table on device reset.

Signed-off-by: Michael J Rubinsky <mrubinsk@horde.org>
No need for reference here.
Only attempt to set the logger if we have a factory.
Need to check both the standard and the non-standard headers here.

Some clients send 'Authorization' here. Allow for both.