InputText support for completion/history/custom callback + added fancy completion example in the console demo app

Unfortunately quite messy because of the UTF-8 <> wchar confusion going
around. Not well tested for UTF-8 compliance with non-Ascii characters.