WebKit: Fix using macro to determine Mac user agent architecture

Using || operator with #ifdef is incorrect. As a result, the
architecture for the user agent is incorrectly set to PPC on an Intel
Mac.

This is a partial backport of r128775 in WebKit upstream.

Task-number: QTBUG-30187
Change-Id: I6842f113fd024ababaf67e76dfee8f93e0988d08
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
QThread::isFinished should return true from finished()

and isRunning() should return false.

This restore the Qt 4.7 behaviour

In Qt 4.7, the finished() was called with the thread's intenal mutex
locked. Which mean that:
 - Call to isRunning or isFinished called from a slot connected to
   finish within the thread would deadlock. (Hence no compatibility
   to keep here)
 - Call to isRunning or isFinished from a slot connected with
   QueuedConnection in another thread would lock the mutex until
   the destructors are finished. and then return as if the thread have
   finished.

Change-Id: I963eccae8f7634aff90cc4bbab6ca886a78e35eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry-picked from qtbase commit ec5e59b73c20a7dc6aec96c829f1e53c3fa58c07)
Task-number: QTBUG-30251
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Improve emission of FocusScope focusChanged signals.

Emit activeFocusChanged up the focus tree when an item receives a focus
event, rather than when the focusItem changes which happens before
internal state is sufficiently updated for hasFocus and hasActiveFocus
to return the correct values from within a changed signal handler.

There are some limitions to this. First the signals are not emitted
reliably when the scene is not active which makes sense for activeFocus
but not for focus.  The second is in some instances the focus and
activeFocus can update unnecessarily while the focus chain sorts itself
out.

QDeclarativeItem tests by Andreas Aardal Hanssen <andreas@hanssen.name>

Task-number: QTBUG-28288
Task-number: QTBUG-25644
(cherry picked from qtquick1/c520a69f06317fb90d37324bf284ef9614cb5dbf)

Change-Id: Iac12bf8c95cbf3525b454f4afca06a54a5c14b4e
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>