Correctly set Method & Reference when uploading Samples
New related Sample should't inherit source
Hide Parent MD5 field when uploading "related" Samples
Use new-sample form, instead of add-attachment, when adding Email attachment
Display Sample upload errors inside form.
Change parent_xxx to related_xxx for default "related_to" relationships
Improve validation of related Sample uploads
Consistently copy Campaigns during related Sample upload
Fix "Email Me Results" function of Sample upload
Fix Sample relationship forging for .rar/.zip
Improve unzip/unrar Method & inherit Campaigns during Unrar
Distinguish file/metadata Sample uploads in Method field
Give samples ability to have multiple filenames.

Works similar to campaign aliases. There is one main filename (which can
now be modified in-line) which is the filename your organization prefers
that sample go by. There's also a list of filenames which are other
filenames people have reported that binary going by.

If you upload a Sample that already exists in the database, the filename
will get appended to the list of filenames if it isn't already the
filename or in the list of existing filenames.

Searching "Filename" in the advanced search for Samples now does a $or
between both fields so you will search both simultaneously.

Closes #5.
Make Source inheritance a Sample upload form option
Make Campaign inheritance a Sample upload form option
Merge pull request #175 from crits/filenames

Give samples ability to have multiple filenames.
Fix redirect bug.

Make the javascript look for a redirect_url key, and if it exists, use it.

Make all the places that were using redirect.html just put the URL in the
response.

Since nobody is now using redirect.html, remove it.

See discussion in #131.
Merge branch 'pr/131'
Better handling of downloads.

Make sure downloading works correctly. Prior to this change all binaries were
incorrectly converted to stix in their raw format, which obviously doesn't
work.

It is best to illustrate how downloads work by an example. Let's say I have
a sample (A) with 2 relationships (sample B and indicator C). If I choose
to download (A) with a depth of 0, result format is zip and binary format is
raw I should get a zip file whose contents are (A) with no binary conversion.

If I choose to download (A) in STIX format the binary format must be either
zlib or base64. The form will default to base64 and not allow it to be changed.
I should get a STIX document who'se contents contain both the metadata for (A)
and also the base64 blob.

If I choose to download (A) in STIX format without the binary then I should get
a STIX document with only the metadata for (A).

If I choose to include relationships (via the depth form field), result format
is zip and binary format is raw, I should get a zip file containing the two
samples (A and B) in raw format and (C) in STIX format.

If I choose to include relationships but pick STIX then I should get a zip file
with 3 STIX documents inside it (A, B and C).

If I choose to include relationships but pick STIX without binaries I should
get a zip file with 3 STIX documents inside it (A, B and C) with only metadata.

In all cases, zip files are always protected with the default password.

Note: Starting from a PCAP or certificate is a completely different piece
of code which doesn't have options like this. At some point we should consider
consolidating those downloads into this format.

Fixes #185.
Merge pull request #188 from crits/issue_185

Better handling of downloads.