WIP #162 8u40 - Add support for Dialogs

Initial working wrappers for part of the new Dialog API including example use (LoginDialogDemo).