Revert "Possible leak in android_emoji_EmojiFactory_newInstance"

This reverts commit d8d765327330c6baffe0c60a377514a2fc6da77d.
Revert "Fix aliasing and C++11 issues."

This reverts commit 8c4bd7295488bdd7a2efd91756c49aaac98d3f6d.
Possible leak in android_emoji_EmojiFactory_newInstance

jchars is not released correctly if factory is NULL.
In addition, unnecessary string conversion removed.

Change-Id: I3ea58391dfe7a96ea6d6ae61bb0867a2d8d49fb0

Conflicts:
	core/jni/android_emoji_EmojiFactory.cpp
Fix aliasing violations only and not c++11 mode:

picked code bits from this change:  https://github.com/SaberMod/android_frameworks_base/commit/4ea79c201e537e5490cc459c7438cf2f7f0c53b4