Added functionality to lineplot2d

Added additional inputs to lineplot2d that make it easier to use in
complex situations. Also allow legend positioning.
original commit

Original commit for align_timeseries.
original commit for portaudio_GetDevice

Function is of marginal usefulness at present.
original commit for portaudio_playrec

Has some limitations, but the guts of it work. For instance, a timed
recording will be minimally 5 s, which is kind of dumb (silly CWB).
Needs work and love, but overall working OK.