text-classify: try to cope with TEI <choice> elements

In the TEI xml format, <choice> elements contain two or more versions of
the same thing. In the NZETC texts, they seem to usually contain a
<orig/><reg/> pair, where <orig> holds a name as written, and <reg> holds
a regularised version. Here is an example (slightly reformatted):

<name type="person"><choice>
 <orig><foreign xml:lang="en">Rev. M</foreign>. Pahewa</orig>
 <reg><foreign xml:lang="en">M</foreign>. Pahewa</reg>
</choice></name>

A naive reading doubles the name in the text, so with this patch we drop
all children except <orig>.

This is not really correct, as <choice> can contain any number of elements
from this set:

   abbr choice corr expan orig reg sic unclear

See http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-choice.html
text-classify: avoid misleading message with no collapsed chars
test_backprop: --basename sets log name, as advertised in --help
Add optional pre-synaptic noise

This adds gaussian noise after the matrix calculation, and before the
non-linearity (i.e. the rectifier). On test_backprop, the effect seems to
be to speed up each generation, but to converge at a higher entropy than
would be obtained without noise.

Not very well tested outside of test_backprop.
test_backprop: --adjust-noise to adjust regularisation with learn-rate

This is a bit blunt -- you probably want to adjust the noise at a
different rate.
test_backprop: simplify initialisation with macros
Move Gstreamer plugins to their own directory

Build `libgst*.so` in `./plugins`, not `.`. The practical advantage of
this is saving hundreds of milliseconds at the startup of each
gstreamer-using process. At start up, gstreamer searches all the
directories in its plugin path for plugins. When `.` is in the path,
gstreamer looks through all the subdirectories including, e.g.
net/autosave which can end up with thousands of files.

If there are cases where the plugin directory is still set to `.` in a
player, the plugins will still be found due to the recursive search.
Makefile: try out GCC 4.9
classify: fix stub for dot-file dump
charmodel: don't assume outsize == insize in construct_net_filename

This is so the text-classify can reuse it.
test_backprop: shift image-related attributes into a sub-struct

This is to make things easier for text-classify.
test_backprop: split out opt helper function for sharing

So text-classify can use it.
text-classify: add command line options, simplify epoch (still useless)

This leaves text-classify still non-functional, but actually doing work
in that the epoch runs and trains the net. Its just that it doesn't let
you know what its learning.