Perf - replace std::vector and its needless initialization with boost::scoped_array
Improve performance in all sorts of places by cleaning up convert_types:
1. Don't use tmp scratch space for nonfloat->float case (just do a direct
   convert from buffer to buffer)
2. If you must use scratch space, use stack if small, heap only if big.
3. Rearrange switch cases to have common ones first, impossible ones never.
4. Drop useless parameters (but provide one of the old signature for
   link compatibility).