Add initial works for Qt5.

* qt4/candwin/qt4.cpp
* qt4/candwin/qt4.h
* qt4/chardict/bushuviewwidget.cpp
* qt4/chardict/chargridview.cpp
* qt4/chardict/chargridview.h
* qt4/chardict/qt4.cpp
* qt4/chardict/qt4.h
* qt4/chardict/unicodeviewwidget.cpp
* qt4/edittest/main.cpp
* qt4/immodule/abstractcandidatewindow.cpp
* qt4/immodule/abstractcandidatewindow.h
* qt4/immodule/candidatetablewindow.cpp
* qt4/immodule/candidatetablewindow.h
* qt4/immodule/candidatewindow.cpp
* qt4/immodule/candidatewindow.h
* qt4/immodule/caretstateindicator.cpp
* qt4/immodule/caretstateindicator.h
* qt4/immodule/qtextutil.cpp
* qt4/immodule/subwindow.cpp
* qt4/immodule/subwindow.h
* qt4/pref/customwidgets.cpp
* qt4/pref/customwidgets.h
* qt4/pref/keyeditformbase.cpp
* qt4/pref/keyeditformbase.h
* qt4/pref/olisteditformbase.cpp
* qt4/pref/olisteditformbase.h
* qt4/pref/qt4.cpp
* qt4/pref/qt4.h
* qt4/switcher/qt4.cpp
* qt4/switcher/qt4.h
* qt4/toolbar/common-quimhelpertoolbar.cpp
* qt4/toolbar/common-quimhelpertoolbar.h
* qt4/toolbar/common-uimstateindicator.cpp
* qt4/toolbar/common-uimstateindicator.h
* qt4/toolbar/standalone-qt4.h
  - Fix in including header files in Qt5.
* qt4/common.pro.in
* qt4/edittest/edittest.pro
  -  (QT): Add widgets in Qt5.
* qt4/immodule/plugin.cpp
  - Undefine Bool, Expose, FocusIn, FocusOut, FontChange
    KeyPress, KeyRelease, None, which are defined by X11 header file in Qt5.
  - (UimInputContextPlugin):
    Use QPlatformInputContext instead of QInputContext in Qt5.
  - Don't use Q_EXPORT_PLUGIN2 in Qt5.
  - Fix in including header files in Qt5.
* qt4/immodule/plugin.h
  - Include private/qplatforminputcontextplugin_qpa_p.h
    instead of QtGui/QInputContextPlugin in Qt5.
  - (UimInputContextPlugin): Inherit
    QPlatformInputContextPlugin instead of QInputContextPlugin.
  - (UimInputContextPlugin):
    Use QPlatformInputContext instead of QInputContext in Qt5.
* qt4/immodule/quiminputcontext.cpp
  - (QUimInputContext::setFocusWidget):
    Don't call QInputContext::setFocusWidget() in Qt5.
  - (QUimInputContext::commitString, QUimInputContext::updatePreedit):
    Don't call QInputContext::sendEvent() in Qt5.
  - Fix in including header files in Qt5.
* qt4/immodule/quiminputcontext.h
  - (QUimInputContext): Inherit QPlatformInputContext
    instead of QInputContext.
* qt4/immodule/quiminputcontext_compose.cpp
  - Undefine Expose, which is defined in X11 header file.
  - Don't define some functions in non-X11.
* qt4/immodule/quiminputcontext_with_slave.h
  - Use QPlatformInputContext instead of QInputContext in Qt5.
* qt4/immodule/quiminputcontextplugin.pro.in
  -  (QT): Add platformsupport-private in Qt5.
* qt4/toolbar/standalone-qt4.cpp
  - (UimToolbarDraggingHandler::paintEvent):
    Call QPainter::drawLine() instead of qDrawShadeLine() in Qt5.
  - Fix in including header files in Qt5.
Merge branch 'master' into qt5
Add "--with-qt5" and "--with-qt5-immodule" option.

* Makefile.am
  - (SUBDIRS): Add qt5.
* configure.ac
  - Add "--with-qt5" and "--with-qt5-immodule" option.
* m4/Makefile.am
  - (EXTRA_DIST): Add ax_path_qmake5.m4.
* make-dist.sh
  - (CONF_FULL_WO_MAINT): Add "--with-qt5" and "--with-qt5-immodule".
* m4/ax_path_qmake5.m4
* qt5/Makefile.am
* qt5/candwin/Makefile.am
* qt5/candwin/uim-candwin-qt5.pro.in
* qt5/chardict/Makefile.am
* qt5/chardict/uim-chardict-qt5.pro.in
* qt5/edittest/Makefile.am
* qt5/immodule/Makefile.am
* qt5/immodule/quiminputcontextplugin.pro.in
* qt5/pref/Makefile.am
* qt5/pref/uim-pref-qt5.pro.in
* qt5/switcher/Makefile.am
* qt5/switcher/uim-im-switcher-qt5.pro.in
* qt5/toolbar/Makefile.am
* qt5/toolbar/uim-toolbar-qt5.pro.in
  - New file.
Add support for Qt5 immodule API.

* qt4/immodule/plugin.cpp
  - (UimInputContextPlugin::create): Change prototype for Qt5.
  - (UimInputContextPlugin::languages,
     UimInputContextPlugin::displayName,
     UimInputContextPlugin::description,
     UimInputContextPlugin::createLanguageList): Don't define in Qt5.
* qt4/immodule/plugin.h
  - Use Q_PLUGIN_METADATA for Qt5 immodule.
  - (UimInputContextPlugin::create): Change prototype for Qt5.
  - (UimInputContextPlugin::languages,
     UimInputContextPlugin::displayName,
     UimInputContextPlugin::description,
     UimInputContextPlugin::createLanguageList): Don't declare in Qt5.
* qt4/immodule/quiminputcontextplugin.pro.in
  - (QT): Remove lines for Qt5.
* qt5/immodule/quiminputcontextplugin.pro.in
  - (TEMPLATE, CONFIG): Remove. Call load() instead.
  - (QT): Remove version check.
  - (OTHER_FILES): Add uim.json.
* qt5/immodule/uim.json
  - New file.
Validate arguments in uim-candwin-qt4.

* qt4/candwin/qt4.cpp
  - (CandidateWindow::activateCand): Validate arguments
    to avoid crashes.
Introduce proxy class to call uim-candwin-qt4.

* qt4/immodule/candidatewindowproxy.cpp
* qt4/immodule/candidatewindowproxy.h
  - New file.
* qt4/immodule/quiminputcontext.cpp
* qt4/immodule/quiminputcontext.h
  - Replace AbstractCandidateWindow with CandidateWindowProxy.
* qt4/immodule/quiminputcontextplugin.pro.in
  - (HEADERS): Add candidatewindowproxy.h.
  - (SOURCES): Add candidatewindowproxy.cpp.
Rename CandidateWindow to XimCandidateWindow.

* qt4/candwin/qt4.cpp
  - (CandidateWindow): Move to ximcandidatewindow.cpp.
  - Cosmetic changes.
* qt4/candwin/uim-candwin-qt4.pro.in
  - (HEADERS): Add ximcandidatewindow.h.
  - (SOURCES): Add ximcandidatewindow.cpp.
* qt4/candwin/ximcandidatewindow.cpp
  - Move from qt4.cpp.
  - Rename to XimCandidateWindow.
  - Cosmetic changes.
* qt4/candwin/ximcandidatewindow.h
  - Move from qt4.h
  - Rename to XimCandidateWindow.
  - Cosmetic changes.
Move some files from immodule to candwin.

* qt4/candwin/Makefile.am
  - (EXTRA_DIST):
    * Remove qt4.h.
    * Add qt4.cpp, abstractcandidatewindow.h, abstractcandidatewindow.cpp,
      candidatetablewindow.h, candidatetablewindow.cpp, candidatewindow.h,
      candidatewindow.cpp, subwindow.h, subwindow.cpp and qt4.cpp.
* qt4/immodule/abstractcandidatewindow.cpp
* qt4/immodule/abstractcandidatewindow.h
* qt4/immodule/candidatetablewindow.cpp
* qt4/immodule/candidatetablewindow.h
* qt4/immodule/candidatewindow.cpp
* qt4/immodule/candidatewindow.h
* qt4/immodule/subwindow.cpp
* qt4/immodule/subwindow.h
  - Move to qt4/candwin.
  - Replace uim functions with fprintf() and fflush().
  - Cosmetic changes.
* qt4/candwin/uim-candwin-qt4.pro.in
  - (HEADERS)
    * Remove qt4.h.
    * Add abstractcandidatewindow.h, candidatetablewindow.h,
      candidatewindow.h and subwindow.h.
  - (SOURCES)
    * Add abstractcandidatewindow.cpp, candidatetablewindow.cpp,
      candidatewindow.cpp and subwindow.cpp.
* qt4/candwin/ximcandidatewindow.h
  - Cosmetic changes.
* qt4/immodule/Makefile.am
  - (EXTRA_DIST):
    * Remove abstractcandidatewindow.h, candidatetablewindow.h,
      candidatewindow.h, subwindow.h, abstractcandidatewindow.cpp,
      candidatetablewindow.cpp, candidatewindow.cpp and subwindow.cpp.
Add utility function parse_messages().

* qt4/candwin/uim-candwin-qt4.pro.in
  - (HEADERS): Add util.h.
  - (SOURCES): Add util.cpp.
* qt4/candwin/util.cpp
* qt4/candwin/util.h
  - New files to define parse_messages().
* qt4/candwin/ximcandidatewindow.cpp
  - (XimCandidateWindow::slotStdinActivated): Use parse_messages().
  - (XimCandidateWindow::strParse): Remove.
* qt4/candwin/ximcandidatewindow.h
  - (XimCandidateWindow::strParse): Remove.
Add function get_messages().

* qt4/candwin/util.cpp
* qt4/candwin/util.h
  - (get_messages): New.
  - (parse_messages): Remove an argument exitOnClose.
* qt4/candwin/ximcandidatewindow.cpp
  - (XimCandidateWindow::slotStdinActivated): Use get_messages().
Add support for socket to AbstractCandidateWindow.

* qt4/candwin/abstractcandidatewindow.cpp
  - (AbstractCandidateWindow::AbstractCandidateWindow):
    Add a socket notifier.
  - (AbstractCandidateWindow::slotStdinActivated): New.
* qt4/candwin/abstractcandidatewindow.h
  - (AbstractCandidateWindow::slotStdinActivated): New.
* qt4/candwin/qt4.cpp
  - (main)
    * Support CandidateWindow and CandidateTableWindow.
    * call uim_init() to prevent crash.
* qt4/immodule/candidatewindowproxy.cpp
  - (CandidateWindowProxy::isVisible): Change return value.
  - (CandidateWindowProxy::deactivateCandwin,
     CandidateWindowProxy::clearCandidates,
     CandidateWindowProxy::popup,
     CandidateWindowProxy::layoutWindow,
     CandidateWindowProxy::candidateActivate,
     CandidateWindowProxy::candidateActivateWithDelay,
     CandidateWindowProxy::candidateSelect,
     CandidateWindowProxy::candidateShiftPage):
    Change message.
  - (CandidateWindowProxy::initializeProcess): Add "-v" argument.
  - (CandidateWindowProxy::slotReadyStandardOutput): Implement.
* qt4/immodule/quiminputcontextplugin.pro.in
  - (INCLUDEPATH): Add candwin.
  - (HEADERS): Add util.h.
  - (SOURCES): Add uitl.cpp.
Change arguments of AbstractCandidateWindow::layoutWindow().

* qt4/candwin/abstractcandidatewindow.cpp
  - (AbstractCandidateWindow::layoutWindow): Change arguments.
  - (AbstractCandidateWindow::eventFilter,
     AbstractCandidateWindow::slotStdinActivated):
    Follow change in AbstractCandidateWindow::layoutWindow().
* qt4/candwin/abstractcandidatewindow.h
  - (AbstractCandidateWindow::layoutWindow): Change arguments.
* qt4/immodule/candidatewindowproxy.cpp
* qt4/immodule/candidatewindowproxy.h
  - (CandidateWindowProxy::layoutWindow): Change arguments.
* qt4/immodule/quiminputcontext.cpp
  - (QUimInputContext::update):
    Follow change in CandidateWindowProxy::layoutWindow().
Honor settings about window style.

* qt4/immodule/candidatewindowproxy.cpp
  - (CandidateWindowProxy::candidateWindowStyle): New.
  - (CandidateWindowProxy::initializeProcess):
    Call CandidateWindowProxy::candidateWindowStyle().
* qt4/immodule/candidatewindowproxy.h
  - (CandidateWindowProxy::candidateWindowStyle): New.
* qt4/immodule/quiminputcontext.cpp
  - (QUimInputContext::createCandidateWindow):
    Remove commented-out codes.
Cosmetic changes in qt4/candwin/ximcandidatewindow.cpp.

* qt4/candwin/ximcandidatewindow.cpp
  - (XimCandidateWindow::moveCand): Remove spaces.
Replace with uim_candidate with CandData.

* qt4/candwin/abstractcandidatewindow.cpp
  - (AbstractCandidateWindow::preparePageCandidates):
    Cosmetic change.
  - (AbstractCandidateWindow::~AbstractCandidateWindow,
     AbstractCandidateWindow::clearCandidates,
     AbstractCandidateWindow::setNrCandidates,
     AbstractCandidateWindow::setCandidates,
     AbstractCandidateWindow::setPage,
     AbstractCandidateWindow::setPageCandidates):
    Replace with uim_candidate with CandData.
* qt4/candwin/abstractcandidatewindow.h
  - (AbstractCandidateWindow): Ditto.
* qt4/candwin/candidatetablewindow.cpp
  - (CandidateTableWindow::updateView): Ditto.
* qt4/candwin/candidatewindow.cpp
  - (CandidateWindow::updateView): Ditto.
* qt4/candwin/util.h
  - (CandData)
    * Move from qt4/candwin/ximcandidatewindow.h.
    * Rename from label to headingLabel.
    * Add member annotation.
* qt4/candwin/ximcandidatewindow.cpp
  - (XimCandidateWindow::activateCand,
     XimCandidateWindow::setPageCandidates,
     XimCandidateWindow::setPage): Follow change in CandData.
* qt4/candwin/ximcandidatewindow.h
  - (CandData): Move to util.h.
Define UIM_QT_USE_{NEW_PAGE_HANDLING,DELAY} in util.h.

* qt4/candwin/abstractcandidatewindow.h
  - (UIM_QT_USE_NEW_PAGE_HANDLING, UIM_QT_USE_DELAY): Don't define here.
* qt4/candwin/util.h
  - (UIM_QT_USE_NEW_PAGE_HANDLING, UIM_QT_USE_DELAY): Define here.
* qt4/immodule/candidatewindowproxy.cpp
  - Don't include "util.h" here.
* qt4/immodule/candidatewindowproxy.h
  - (UIM_QT_USE_NEW_PAGE_HANDLING, UIM_QT_USE_DELAY): Don't define here.
Change variable name from cwin to proxy.

* qt4/immodule/quiminputcontext.cpp
  - (QUimInputContext::~QUimInputContext,
     QUimInputContext::createCandidateWindow,
     QUimInputContext::setFocus,
     QUimInputContext::unsetFocus,
     QUimInputContext::reset,
     QUimInputContext::update,
     QUimInputContext::cand_activate_cb,
     QUimInputContext::cand_select_cb,
     QUimInputContext::cand_shift_page_cb,
     QUimInputContext::cand_deactivate_cb,
     QUimInputContext::switch_system_global_im_cb,
     QUimInputContext::savePreedit,
     QUimInputContext::restorePreedit,
     QString QUimInputContext::getPreeditString,
     QUimInputContext::getPreeditCursorPosition,
     QUimInputContext::switch_system_global_im,
     QUimInputContext::updatePosition):
    Change variable name from cwin to proxy
    because this variable is no longer a window instance.
* qt4/immodule/quiminputcontext.h
  - (QUimInputContext): Ditto.
Send candidate data when activating.

* qt4/candwin/abstractcandidatewindow.cpp
  - (AbstractCandidateWindow::setCandidateData):
    New function.
  - (AbstractCandidateWindow::slotStdinActivated):
    Call AbstractCandidateWindow::setCandidateData().
* qt4/candwin/abstractcandidatewindow.h
  - (AbstractCandidateWindow::setCandidateData):
    New function.
* qt4/immodule/candidatewindowproxy.cpp
  - (CandidateWindowProxy::candidateActivate):
    Send candidate data.
Remove debug codes.

* qt4/candwin/abstractcandidatewindow.cpp
  - (AbstractCandidateWindow::slotStdinActivated):
    Remove debug code.
* qt4/immodule/candidatewindowproxy.cpp
  - (CandidateWindowProxy::slotReadyStandardOutput):
    Ditto.
Don't hardcode path of uim-candwin-qt4.

* qt4/immodule/candidatewindowproxy.cpp
  - (CandidateWindowProxy::initializeProcess):
    Specify path of uim-candwin-qt4 with UIM_LIBEXECDIR.