Background library

BackgroundLibrary is a rewrite of the Background Fitting functions into a compact library, so that each piece of fitting code does not define their own (possibly slightly different) versions.