Moved duplicate methods to util.py

And modified NaiveBayes.py and Rocchio.py to use the implementations
from util.py