printed Java rewrite engine statistics only when --statistics is on

fixed https://github.com/kframework/k/issues/987
@dwightguth please review 
why was this entire function deleted?