remove curve fitting functionalities and thus dependency on Distributions (Close #56)

This PR supersedes #56, and completes this lengthy procedure of separating out curve fit from Optim.

I basically did the same changes as in #56.

PR #56 becomes tricky to merge after this long time.