Expose ui_has_initialized

Useful for command line processes so they can determine whether ui
functions are possible.

Change-Id: I2e1b8af39806973ae11eaed5bbdb1f3b6ddc7b13