checks: fix empty source and target strings causing exceptions.

Things went wrong when taking the last character of an empty string in trans.checks.chars, which would throw an IndexError. That has also been causing nijel/weblate#320.

trans.checks.base does not check the positions it receives either, so might throw an IndexError as well (although I have not observed that yet). Since positions can be quite complex (positive, negative and lists of both), I opted for a try/catch approach for graceful degradation.