create nupic.common.utils for shared methods

add MovingAverage class which I shamelessly stole from anomaly_likelihood.py,
thanks!
steal tests from utils.MovingAverage
anomaly_likelihood uses newly extracted utils.MovingAverage
MovingAverage.next() method
Anomaly: use utils.MovingAverage
Anomaly rename method to .compute() to fit SP/TP

throw error if inputValue not specified for MODE_LIKELIHOOD
and rename param value to clearer inputValue
fix: missing import under some conditions
Merge branch 'master' into anomaly_call_likelihood
new test for anomaly with likelihood mode
Anomaly: new test for anomaly_likelihood mode
Merge branch 'master' into anomaly_call_likelihood
fix method name in anomaly.compute()
updated test
Merge branch 'master' into anomaly_call_likelihood
finalize Anomaly likelihood mode test
Anomaly likelihood test - increase training times

to avoid random test failures
Merge branch 'master' into anomaly_call_likelihood
Anomaly likelihood test: use py SP, hack smaller train times
less strict test
complement meaning for "anomaly likelihood mode" score

it is an anomaly, so we won't just return likelihood code,
but its complement:
anomaly score= (1 - likelihood)

learned data->hi likelihood->lo anomaly
unexpected data->lo likelihood->hi anomaly