Force QML engine debug output to stderr in qmlplugindump

In this case the debug output is actually meant to be read by the user.
Logging it to some system facility, as on BlackBerry doesn't help. To
fix that a message handler that redirects all debug output to stderr
is installed.

Task-number: QTBUG-36378
Change-Id: I16dbca8bc4d07e0aabc2b41ce93b56bd679fa166
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Remove an unused constructor

Fortunately we don't use this constructor anymore. This also
allows us to fix the assert in qv4managed. Now we finally
enforce that every managed object must have an internal class
and a vtable.

Change-Id: Idf9081c20633b44b79970fec4cc4d1ec5e6a6f7c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Smaller performance fixes

Move commonly used variables in the ExecutionEngine
to the beginning of the struct to increase cache locality.
Keep the engine pointer in a register in the interpreter to
save one memory load per instruction.

Change-Id: If2540c66b62685701511f410aff495c0a20ca694
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Move PersistenValue and WeakValue into it's own file

They deserve having their own set of files, and it helps
reduce dependencies.

Change-Id: Ifd4394f88ef51cbccc61bf92dd20636f570141d9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Unify the interface for QQmlDebugServices

Let the debug server handle adding and removing of engines through
defined interfaces to prepare for multi-engine profiling and debugging.

Change-Id: I7b277e54bdcce1d3e95e723f041a7db6b08b29fc
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Prevent concurrent access to v4 debugger

Without this new engines can be added to the QV4DebugService while
breakpoints are set from the debugger thread. In rare cases this leads
to a situation where the DebuggerAgent::addDebugger() doesn't see the
new breakpoint and DebuggerAgent::addBreakPoint() doesn't see the new
debugger. Thus the breakpoint will never be set.

This effect is easily reproducible by repeatedly (about 100 times)
running the setBreakpointInScriptOnTimerCallback autotest.

Change-Id: I5da27478bf579ab24f81aebabbdd321f38fae3f4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>