[JENKINS-23641] - Annotate BuildData::getLastBuiltRevision()

The change aims errors in publishers when the checkout failed.

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>