Misc emulator UI fixes.

This patch fixes several regressions introduced in previous
patches, unfortunately:

 * -no-window option displayed a window and crashed immediately.
 * The emulator window title was always 0:<name>, i.e. the port
   number was always 0.
 * Using '-gpu on' didn't work: The window was created, but no
   content was displayed.

Change-Id: I4e8b2f4be053513aa80c6e381eb7ce076239cc60
hw-sensors: Delay initialization of the remote controller.

Because the implementation depends on init_clocks() being called before
to work properly. This is required to avoid a crash after a future
refactoring patch is applied.

Change-Id: I960adaac3ad4d01ee586254674786e1cd4b7173e
Add UTF-8 encode/decode functions.

These will be used by later patches.

Change-Id: I26e8b6f72fc2c89c957df94f0c2eccdd8119c252
Merge changes I26e8b6f7,I960adaac,I4e8b2f4b

* changes:
  Add UTF-8 encode/decode functions.
  hw-sensors: Delay initialization of the remote controller.
  Misc emulator UI fixes.