- adapted kernel32 so that it no longer (directly) manages console
  handles as wineserver handles
- console input handle object is no longer waitable (input record
  synchronisation is now implemented as a simple semaphore), and removed
  FD_TYPE_CONSOLE from fd types in wineserver
- console handles now always have their two lower bit set so one can
  distinguish a console handle from a kernel object handle
- implemented some undocumented kernel32 console related APIs
  (CloseConsoleHandle, GetConsoleInputWaitHandle, OpenConsoleW,
  VerifyConsoleIoHandle, DuplicateConsoleHandle)
- allowed a few kernel32 APIs to take console pseudo-handles
  (FlushFileBuffer, GetFileType, WaitFor*Object*)
- simplified the console inheritance at process creation
- in console tests, no longer create a console if one already exists

diff --git a/server/protocol.def b/server/protocol.def
index 51e3bc9..c117b41 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -627,7 +627,6 @@
 {
     FD_TYPE_INVALID,
     FD_TYPE_DEFAULT,
-    FD_TYPE_CONSOLE,
     FD_TYPE_SOCKET,
     FD_TYPE_SMB
 };
@@ -776,6 +775,7 @@
     unsigned int access;        /* wanted access rights */
     int          inherit;       /* inherit flag */
     process_id_t pid;           /* pid of process which shall be attached to the console */
+    obj_handle_t wait_event;    /* semaphore for number of active input events */
 @REPLY
     obj_handle_t handle_in;     /* handle to console input */
     obj_handle_t event;         /* handle to renderer events change notification */
@@ -851,6 +851,12 @@
 @END
 
 
+/* Get the input queue wait event */
+@REQ(get_console_wait_event)
+@REPLY
+    obj_handle_t handle;
+@END
+
 /* Get a console mode (input or output) */
 @REQ(get_console_mode)
     obj_handle_t handle;        /* handle to the console */