Fix infinite loop in method overload resolution

When resolving overloaded slots in a situation without property cache, then we
need to detect that we've reached the end of the overload lists and exit from
RelatedMethod with zero.

Task-number: QTBUG-37157
Change-Id: Ifaab8cc1b377725c99c1bb89bb9bb74d5a0af1b8
Reviewed-by: Michael Brasser <michael.brasser@live.com>