Check WAVEFORMATEX for AAC before checking bits

The bits per sample will always be 16 if using with encoded formats, so
instead of checking the bits first, check the format first.
Use references for ConnectPins and RenderFilters

There's no reason to be using direct pointers here, it just makes the
code kind of messy
Use GetFilterPin instead of FindPin

This will help to allow us to find exception pins later on with a
customized means of finding the appropriate pin.
Make PinIsCategory check for no interface

If the pin has no interface, then it's a custom made demuxer pin.  You
cannot query a category from a custom demuxer pin, so it'll be the
desired pin if this is used on a demuxer filter.  So if there is no
interface for IKsPropertySet, then assume it's the correct pin.
Move uncommon format GUIDs out of formats header

The problem here is that the GUIDs are already valid externs if you use
the wmcodecdsp.h file, but that they just need to have a definition.
Clearly microsoft couldn't figure out how to do this without being
morons, so they opted for some INITGUID approach which doesn't even work
properly.

For the formats we need to use, we will just define them ourselves to
make life a little bit less painful than trying to figure out
microsoft's header mess garbage or try to figure out which stupid obsure
microsoft .lib file has the correct definitions.
Add AAC GUID

It's another one of those uncommon formats that microsoft doesn't seem
to export anywhere sensible, so we'll just create a definition
ourselves.
Add GetPinByName function

This allows us to get the pin by the name of the pin.  Useful for
certain pins such as 656 on the HD-PVR2.  If the name is null, then it
will just get the first pin that matches the direction.
Add CoTaskMemPtr class

This allows safer and more elegant handling of memory pointers allocated
with CoTaskMemAlloc.
Add function to get the pin medium

The pin medium is a value that is used to associate input/output pins of
related filters to each other.  Using the pin medium, it is then
possible to search for the related encoders, crossbars, and other such
types of filters that are a part of the device.
Add functions to find pins/filters by medium

The GetPinByMedium function searches a filter for pin that has the
specified medium.

The GetFilterByMedium searches system filters of a specific category for
a filter that has the matching medium on an input or output pin.
Add MapPinToPacketID function

This is a function that maps a created demuxer pin to a specific packet
ID within the stream.  Should only be called after the
device/encoder/etc filters have all been connected to the demuxer filer.
Add MediaType::AllocFormat function

This safely allocates data and fills out the pbFormat and cbFormat
member varaibles of the structure.
Remove VideoFormat::MPEG2

This format isn't used and is unlikely to ever be used
Add AudioFormat::AC3

It turns out the HD-PVR1 uses AC3 for its audio, so add it to the audio
formats enum.
Add MEDIASUBTYPE_DVM GUID definition

We're just going to use DVM to identify the AC3 format on the pin.
Add demuxer helper functions

These functions are used to create audio/video pins on demuxers.  Also
specifies the names of the demuxer pins.
Add DirectConnectFilters helper function

This function attempts to directly connect the output pins of an output
filter to the input pins of an input filter automatically.  If any pins
were connected by the function, it returns true, otherwise false.

Does not use smart connect -- this function is meant to be used to
connect a crossbar filter to the main device filter.
Add MPEG-1 audio support

Apparently the HD-PVR Rocket uses MPEG-1 audio.
Remove 'trying pins' message

It's a bit redundant to have this message.  It happens for specific
devices regardless, so there's no real need to warn about it.
Set MediaTypePtr pointer value to null on clear

This prevents any potential of the pointer value being leaked if the
pointer value fails to be set