sql-reporter: add support for Ref change

This change fixes AttributeErrors when the sql reporter
is used in post/periodic pipelines where the item.change is of
type Ref without number/patchset/refspec members.

Change-Id: I11696b41a0a71405dfb7845ce222ef302a96986b
1 file changed