Thread safe fitters

This pull request should fix all the problems related to thread safety for both fitters and smoothers. This should completely solve all the problems highligthed in the yellow box in this talk: https://indico.cern.ch/event/293016/session/7/contribution/61/material/slides/0.pdf

FYI
@VinInn