Add support for FORMAT_VideoInfo2

FORMAT_VideoInfo2 is a commonly used format (whether I like it or not).
However, the foolish developers at microsoft decided to not make
VIDEOINFOHEADER2 compatible with VIDEOINFOHEADER for whatever reason, so
the only way to get the bitmap info header is by checking explicitly for
FORMAT_VideoInfo2 each time.

GetBitmapInfo must be used when checking for a valid media type to
ensure that it'll return the proper bitmap info header.
Add ShutdownGraph() function.

This function allows you to safely shut down the graph within a specific
thread that DirectShow may be used on.

I realized this function was needed when I started having issues trying
to use DirectShow in multiple threads.  You just can't do it; DirectShow
really must be contained to a single thread if you don't want to have
strange and unpredictable behavior.
Do not fail QueryAccept if running

IPin::QueryAccept is the function that's called to allow output filters
to dynamically change media types during the stream.  We want to allow
changing of media types during the stream, so this function must succeed
when called during in the middle of a stream to be able to do so.
Add IAMFilterMiscFlags interface to capture fitler

The IAMFilterMiscFlags is necessary for certain types of output filters
in order to be able to determine what type of filter the capture filter
is, and treat it appropriately.

Unfortunately microsoft made this sort of ridiculously painful to
implement, like everything else.
Change 'if's to 'else if's
Remove trailing whitespace
Properly implement BeginFlush and EndFlush (IPin)

BeginFlush and EndFlush are supposed to prevent any new samples from
being received in between calls to them.  You're supposed to call
S_FALSE on any received samples and flush existing samples until
EndFlush has been called.
Fill out the CaptureEnumMediaTypes class

This class is used to get the media types for a pin.  It should be
implemented in order to allow other filters to query the current media
type of the pin.
Allow dynamic media type changes

When the media type dynamically changes on a pin, the next IMediaSample
sent will store the new media type used for the audio/video.

Make it so that the audio/video data callbacks include the current
AudioConfig/VideoConfig in order to allow the user of the library to
know when that has occurred.
Always try to directly connect capture filter

Do not use 'smart connect' first.  It will cause unnecessary
intermediary filters such as the 'Smart Tee' (smarty?) filter to be
automatically put between the filters, which can cause problems if you
want to allow dynamic resolution changes.  Instead, use 'smart connect'
as a last resort only if the filters have incompatible types.
Implement handling of encoded data

The microsoft demux filter always splits up encoded data in to sets of
8192-sized IMediaSample packets.  When the packets do not have a
timestamp associated with them, they are part of the previous set of
IMediaSample packets.  Otherwise, it signifies the start of a new set.
There are other ways to detect sets but this is a fairly simple means.

Instead of 'leaving this to the decoder', I decided to just combine the
packets in libdshowcapture before sending them out, to make using those
packets a bit more simple.
Refactor Audio/Video callbacks

It's somewhat pointless and problematic to have two functions which are
essentially just duplicates of each other.
Bla