improvements to boundary handling

profiling adapted to work better with singular fits
profile plotting works better (still not perfect) with non-monotonic profiles
boundary.tol parameter added to try boundary fit when estimate is close
   to boundary