RF: data fitting functions now using least-squares instead of minimisation

also updated tests
should be more robust and much faster (not iterative and no local minima)
ENH: a bugfix to val2array to handle single-val cases better

(tagged as ENH because it fixes a bug in unreleased code)

Was causing shape stimuli not to work in two ways:
1) couldn't handle the fact that the init value of the vertices had been
set as a list rather than array (now fixed during the creation)
2) couldn't handle a singular value because len(np.array(1)) gives error

Solution:
Test for None option first and then immediately convert to np.array.
(should we use asarray instead?). Then test for singular vals using
np.product(value.shape). Seems safer than all other options.