Ticket 581: fix for couple of metrics bugs

Empty lists weren't properly caught in the metrics models (resulting in NaN for numpy averages) and the number of citing papers to refereed papers didn't return the right value (instead it returned the number of refereed citing papers).