Fix crashes when invoking QML JS methods from C++

Make sure to size the QVarLengthArray properly to avoid out-of-bounds
access.

Change-Id: Id075730ffa2e366a729b401b8563ad7fd59597de
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Small exception handling fixes

* Don't accept the exception if we're going to re-throw it (partial unwind
is not necessary as we don't have a stack-based context to clean up)
* However do accept() it if we decided to handle it (in qqmlvme.cpp)

Change-Id: I63bfa34f30fe19ad36de746b1f15fc6b641e563b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>