Implementation of spike train metrics

Includes some refactoring of ```rate_estimation```, moving some of the code to the new ```signal_processing``` module.