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