fix updatefigures, add return of loss struct from nntrain

nntrain now returns nn, L, loss (This breaks some previous examples)
nnupdatefigures simplified greatly.

add the opportunity to use custom errorfun and plotting function.
dont sample h2
add mathew + fix minibatch extraction to handle uneven numbers
fix plotting without validation data
test
test2
saves network for every 10 epochs in
saves weights after every 10 epochs
sasves nn weights after every 10 epocshs
only saves weights if better than previous
better saving of weights
fix legend placement
Added dropout to input
added variable learning rate and momentum options (see nntrain)
clean funcs
using input dropout input layer
adds bytesize which gets size of array in bytes
Saves figure after every 10 epochs if opts.outputfolder is set... avoids losing the figure if server is restarted
slight changes to how the figure is saved
add gpu functions