C++: Check for Function::name() before using it

Lambdas do not have a name.

Change-Id: Ifda4816c62dcfe19bdbb1649dc1caf408e056b37
Task-number: QTCREATORBUG-12686
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
qmljs: make Context::vContext publicly accessible

Change-Id: I3307bd37f55de9d769e1fa9ecaf253fa5887ca64
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
qmljs: add libPath utility method

Change-Id: Ie99d3cbff602e38418faeda565526793089a543c
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>