Parse multiple buttons during mouse press and release

Copies the logic for parsing mouse buttons from Qt5 QtWebKit so that
button clicks when another button is held works.

Task-number: QTBUG-42319
Change-Id: If56e20533531fe949eef444eb7e2f747907f5bcc
Reviewed-by: Michael Bruning <michael.bruning@digia.com>