Bug: ambiguous conversion of constraints

Bug [reported](https://groups.google.com/forum/#!topic/roboptim/Gw-GMYuTReo) by @perrin-isir.

I guess the problem here is that `ConstantFunction` (that derives from `LinearFunction`) can be converted to either `DifferentiableFunction` or `LinearFunction` in the `boost::variant<boost::shared_ptr<LinearFunction>, boost::shared_ptr<DifferentiableFunction> >`, hence the `call to member function is ambiguous`error:

```
/usr/include/boost/variant/variant.hpp:1591:28: error: call to member function 'initialize' is ambiguous
              initializer::initialize(
              ~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/boost/variant/variant.hpp:1740:9: note: in instantiation of function template specialization
      'boost::variant<boost::detail::variant::over_sequence<boost::mpl::v_item<boost::shared_ptr<roboptim::GenericDifferentiableFunction<roboptim::EigenMatrixDense> >,
      boost::mpl::v_item<boost::shared_ptr<roboptim::GenericLinearFunction<roboptim::EigenMatrixDense> >, boost::mpl::vector0<mpl_::na>, 0>, 0> >, boost::detail::variant::void_,
      boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_,
      boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_,
      boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_,
      boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_>::convert_construct<const
      boost::shared_ptr<roboptim::GenericConstantFunction<roboptim::EigenMatrixDense> > >' requested here
        convert_construct(operand, 1L);
        ^
.../roboptim-core/include/roboptim/core/problem.hxx:412:29: note: in instantiation of function template specialization
      'boost::variant<boost::detail::variant::over_sequence<boost::mpl::v_item<boost::shared_ptr<roboptim::GenericDifferentiableFunction<roboptim::EigenMatrixDense> >,
      boost::mpl::v_item<boost::shared_ptr<roboptim::GenericLinearFunction<roboptim::EigenMatrixDense> >, boost::mpl::vector0<mpl_::na>, 0>, 0> >, boost::detail::variant::void_,
      boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_,
      boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_,
      boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_,
      boost::detail::variant::void_, boost::detail::variant::void_,
      boost::detail::variant::void_>::variant<boost::shared_ptr<roboptim::GenericConstantFunction<roboptim::EigenMatrixDense> > >' requested here
    constraints_.push_back (boost::static_pointer_cast<C> (x));
                            ^
.../roboptim-core/tests/problem.cc:104:11: note: in instantiation of function template specialization
      'roboptim::Problem<roboptim::GenericDifferentiableFunction<roboptim::EigenMatrixDense>, boost::mpl::vector<roboptim::GenericLinearFunction<roboptim::EigenMatrixDense>,
      roboptim::GenericDifferentiableFunction<roboptim::EigenMatrixDense>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
      mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na> >::addConstraint<roboptim::GenericConstantFunction<roboptim::EigenMatrixDense> >' requested
      here
  mixedPb.addConstraint (cstr, intervals, scales);
          ^
/usr/include/boost/variant/detail/initializer.hpp:104:24: note: candidate function
            static int initialize(void* dest, param_T operand)
                       ^
/usr/include/boost/variant/detail/initializer.hpp:104:24: note: candidate function
/usr/include/boost/variant/detail/initializer.hpp:149:17: note: candidate function not viable: requires 0 arguments, but 2 were provided
    static void initialize();
                ^
```

Maybe we need to take a look at [`autopromote.hh`](https://github.com/roboptim/roboptim-core/blob/master/include/roboptim/core/detail/autopromote.hh) and do something similar for conversions, to get the proper constraint type automatically (/summon @thomas-moulard)