Initial code to run NVDA's core pump only when necessary, rather than having it run on a continual timer.

So far, IAccessibleHandler and queueHandler.queueFunction (which is used in many places such as eventHandler and scriptHandler) request a core pump.
queueHandler generators and other handlers need to do this as well.
watchdog: Only wake up if action might actually be required rather than checking using a continual timer.

A waitable timer is used to achieve this. When the core reports as alive, the timer is set so that the watcher will wake if the timer isn't reset or cancelled.
Also, the core pump reports that it is going to sleep at the end of the pump, which cancels the timer. This is necessary because the core doesn't spin any more, so if it isn't doing anything, it won't report as alive.
core.requestPump: Use a time of 10 ms, which seems more reasonable than 1 ms and is the lowest SetTimer will go anyway.
JABHandler: Request a core pump when required.
touchHandler: Add to the core pump and only request a core pump when needed rather than spinning a queueHandler generator.
If there are queueHandler generators, continaully request pumps (spin) so they are executed.

This means that we do spin when there are generators. Ideally, these shouldn't be used, but say all, speak spelling, etc. need some huge refactor before that is possible. At least this way, we only spin when those are active, which is a very specific user request.
core: Clean up stuff related to the pump a bit.
Python console: Notify the watchdog that the core is alive before executing something so that it can act if a command freezes for too long.
Fix an issue where when opening a message in Outlook Express, the message sometimes wouldn't get focused in NVDA until after a key was pressed, causing apparent double speaking in some cases.

Wx timers aren't re-entrant, so if a modal loop runs, the timer just gets ignored. Unfortunately, sending a key press causes a modal loop, so the pump request for the focus event was sometimes being swallowed.
Now, before it exits, the pump checks whether there is a pending request but a pump isn't scheduled. If this occurs, it schedules another one.
Re #3803.
Fix delay in mouse tracking.

The mouse hook now requests a core pump when the mouse moves.
Re #3816.
Touch support: ensure to request a core pump after an appropriate interval to emit timeout multiTouch trackers (e.g. double tap).
Notify watchdog appropriately when executing a delayed IAccessibleHandler call to correct the focus.

Previously, the watchdog didn't know about these calls, so they weren't subject to possible cancellation. This resulted in unrecovered freezes, for example, when alt+tabbing to an unresponsive process.
core.callLater was introduced to facilitate this. It should be used instead of wx.CallLater for any delayed calls which aren't just for UI.
core.requestPump: request the main thread to start the pump timer rather than the calling thread, by using a wx.CallAfter. Re #3801, #3863

WX does not support starting a timer from outside the main thread. This was possibly working some how, but was throwing assertions, and in some caces perhaps was the cause of #3863 - WX was calling DebugBreak.
Gecko vbuf backend: Override the content with aria-label(ledby) where it makes sense; i.e. for elements where the content rendered is usually the same as the name such as links and buttons.
Gecko vbuf backend: Render the name of applications, dialogs and embedded objects so the user knows what they are without further investigation.

We don't render anything else for them, so we may as well render something useful.
MSHTML vbuf backend: Override content with aria-label(ledby) where it makes sense, just as for Gecko.
In browse mode, labels on landmarks are now reported. They are also included in the Elements List dialog.
Initial work on support for the region role in browse mode.

Regions are treated as landmarks, but only if they are labelled. Also, the word "landmark" isn't reported, since this seems rather superfluous.
At present, reporting works correctly, but quick navigation will jump to unlabelled regions and the Elements List breaks when unlabelled regions are encountered.
When searching for a node by attributes in a virtual buffer, use regular expressions matching against a string of requested attributes.

This allows us to match against multiple, completely separate options without needing to write a complex custom query engine. It also allows for easier enhancement in future.
This is necessary to support regions as a landmark because normal landmarks don't need names but regions do.
When navigating by landmark, don't navigate to regions with no label.