fminbox: in case of error, return best result obtained thus far
Fix delete! deprecation warning
Efficiency improvement in cgdescent

For some reason this step was not generating optimized code, and
consequently was causing unnecessary allocation/gc. Splitting out into
a separate function fixed the problem.
Merge commit 'f343227'

Conflicts:
	src/types.jl