Bugfixes for libmetrics.py

Hi again,

excuse the last pull request, it was only sparsely documented and I agree that the change to the outlier removal loop was flawed. I made a fix to the fix, please take a look and let me know what you think.

Both changes address problems that occured on one of our internal data sets (division by zero if filtered_list is empty and undefined std_dev_isize). On my side these changes prevent the runtime errors from happening. Any feedback appreciated.

Best wishes,

Ole