Avoid GStreamer warnings

- Change the state after check all the transitions
- Skip a warning when trying to chain a pad into a buffer when the
  pad is flushing.

Reviewed by: Hugo Parente Lima
Added MediaStream[Audio] API on drowser
Added audio live input support to gstreamer webaudio backend

The approach uses a sub-pipeline to read/deinterleave the audio
buffers from the audiosrc (autoaudiosrc) and provide these buffers
through a pull-based mechanism using appsinks to do that. That
pipeline is encapsulated in the AudioLiveInputPipeline class,
which has one instance created/started at AudioDestination
initialization and is stopped/destructed when the the same
AudioDestination is destructed. The deinterleaved buffers are
then pulled from the input pipeline each time webKitWebAudioSrcLoop
executes and passed to the webaudio stuff into the sourceDataVector.

- To test you may use the following html page, or something like that:
https://gist.github.com/nickdiego/6064829

TODO:

* For now, WebKitWebAudioSrc has been modified to work *only* as a
live source. That doesn't prevent non-live audio to be played, but
introduces some latency in that case.

* There is still some synchronization problem between the pipelines
(input/main) which causes several underflow warnings and some really
short audio breaks into the stream. As a workaround, for now, we're
setting some properties of audiosink, increasing its latency and
drift tolerance. It should be more investigated later.

* Add support to gstreamer 1.0

* Some channel numbers are still hardcoded.

Signed-off-by: Nick Diego Yamane <nick.yamane@openbossa.org>
Rebased with current master and mediastream branches

- Using now std::string and std::vector instead of Nix::String and
  Nix::Vector
- Live-input is now fully working only with gstreamer 1.0
- Simple UserMedia/MediaStream platform api functional implementation

Signed-off-by: Nick Diego Yamane <nick.yamane@openbossa.org>
Update MediaStreamTrack::initialize to new API
Modify GstAudioDevice to be configurable as live/non-live source

GStreamer source elements have some particularities that must be
followed and one of the main consequences is a increased latency time.
WebKitWebAudioSrc didn't operate as a live source until live-input
support has been added. After that is desirable Nix::AudioDevice
implementation works in both modes, live and non-live, depending on the
construction parameters. For example, when 'numberOfInputChannels are 0,
doesn't make sense it to operate in live mode.

This patch adds this feature and besides that it adds some new
properties to WebKitWebAudioSrc regarding number of channels and
removing some hardcoded logic to use this new properties.

Signed-off-by: Nick Diego Yamane <nick.yamane@openbossa.org>