Added option to skip transcoding

- If the video input matches the configurable rules, just copy it to the
  output without transcoding it.
Merge branch 'master' into joar-skip_transcoding

Conflicts:
	mediagoblin/config_spec.ini
If we're not transcoding, copy this file directly over to ['original']

There's no reason to copy it over to 'webm_640' in such a case,
clearly.

Added logic so we don't do it twice either.

Haven't tested this yet though ;)

This commit sponsored by Algot Runeman.  Thank you!
Huge amount of work to (mostly) allow .ogg (and maybe other) formats to skip transcode

 - Update get_display_media in several ways:
   - now uses the media type's own declaration of the order of things
   - returns both the media_size and the media_path, as per the docstring
   - implicitly uses self.media_files as opposed to forcing you to pass it in
 - update videos to use get_display_media
 - update images to declare media_fetch_order in the media manager (videos also)
 - update stl to use media.media_files['original'] instead of weird
   use of get_display_media
 - update sidebar to only conditionally show webm_640

TODO still: identify video type information *during* processing, show
that in the <video><source /></video> element.

This commit sponsored by Nathan Yergler.  Thanks, nyergler!
Now store metadata info from processing into the media type.

This comes in several parts:
 - Store the metadata from gstreamer during processing
 - Add a new JSONEncoded field to the VideoData table
 - And, of course, add a migration for that field!

This commit sponsored by Julius Tuomisto.  Thank you, Julius!
pdb.set_trace() in mediagoblin code is Not Allowed(TM), removing from audio code

Of course, the version that appears here is not really dangerous
because it's for the "call the file individually" form of debugging,
but it isn't allowed anyway.

This commit sponsored by Michael Faryniarz.  Thanks!
{% set %} the display_type and display_path and use that elsewhere

This will make some stuff a bit cleaner that's coming up...

This commit sponsored by J B Nicholson-Owens.  Thanks!
Mild cosmetic cleanups to video.html and adding missing </li> elements.

This commit sponsored by Jukka Hellen.  Thanks!
Extrapolate type= based on the video metadata that we have, if we can.

It's kind of awkward because it relies on there being a entry.media_data,
but that's not guaranteed... (see http://issues.mediagoblin.org/ticket/650)
so we use a dopey fallback in the template in that case (kind of
annoying info duplication).

This commit sponsored by Piotr Wieczorek.  Thank you!
Per Elrond's suggestions moving DEFAULT_WEBM_TYPE to media manager

The reason for this is to avoid defining this twice as we were
previously (once in the template, once in video/models.py)

This commit sponsored by Roland McIntosh.  Thank you!
Another elrond suggestion: only init orig_metadata if there's anything in the dict.

This commit sponsored by Joshua Rosen.  Thank you!
Make copying to/from storage systems memory efficient (#419)

The copy_locally and copy_local_to_storage (very inconsistent terms BTW)
were simply slurping in everything in RAM and writing it out at once.
(the copy_locally was actually memory efficient if the remote system was local)

Use shutil.copyfileobj which does chunked reads/writes on file objects.
The default buffer size is 16kb, and as each chunk means a separate HTTP
request for e.g. cloudfiles, we use a chunksize of 4MB here (which has
just been arbitrarily set by me without tests).

This should help with the failure to upload large files issue #419.
No reason really to pass in fetch_order anyway...

I think this is legacy code from get_display_media being a utility, or
something.  Removed!  (Thanks for pointing this out, Elrond!)

This commit sponsored by Tristan Chambers.  Thank you!
self.media_data->self.media_manager in the docstring.  Thanks for catching, Elrond.

This commit sponsored by Sebastian Hugentobler.  Thank you!
Three fixes to collection adding view, one of them a serious security bug

 - Don't let people who aren't the authors of a collection from adding
   things to it (handled by forcing the user check in the query)
 - request url in case invalid collection selected fixed
 - collection_item.author doesn't yet exist; removing the selection
   (we might want multiple people to be able to edit a collection in
   the future but that future does not yet exist; as Elrond said,
   remove this "false hope")

Thanks to Elrond to pointing out these issues.

And thanks to David Kindler for sponsoring this commit!
commit for pulling
wqMerge branch 'master' of git://gitorious.org/mediagoblin/mediagoblin into dogma
Give a more useful error if a table already exists and so we can't create it during migrations

This commit sponsored by Andrzej Prochyra.  Thanks!
Elrond points out that we should use form.collection.data

That's true; I'm not sure what it's fixing, but he thinks it's fixing
something.  Anyway, it's correct :)

This commit sponsored by Philippe Gauthier.  Thanks!
Merge branch 'joar-skip_transcoding'