Bump rmagick to 2.13.3.

rmagick-2.13.2 is incompatible with versions of ImageMagick built with
--enable-hdri. This includes the version of ImageMagick supplied
with Arch Linux. This prevents rmagick, and consequently Danbooru,
from being installed on Arch Linux.

rmagick-2.13.3 fixed this issue. See https://github.com/rmagick/rmagick/issues/18.
Merge pull request #2259 from evazion/bump-rmagick

Bump rmagick to 2.13.3.
Remove tumblr 1280w -> 500h source rewriting

It was thought that 500h was always the biggest size when it exists, but
it seems it can actually be either bigger or smaller than 1280w.
Merge branch 'master' of https://github.com/r888888888/danbooru
Rewrite tumblr cdn urls
Fix for scraping the manga page count.

The string for the page count has changed. It now looks like "複数枚投稿 3P"
on all Pixiv posts I've checked.
Fix scraping the Pixiv artist username.

The artist's username is no longer contained in the image thumbnail URL on the
HTML page. Get it from the Feed link instead.
Add get_metadata_from_spapi!
Normalize URLs to the mode=medium page correctly.

This handles a few new cases that weren't handled correctly previously.

* http://i1.pixiv.net/img-zip-ugoira/img/2014/10/03/17/29/16/46323924_ugoira1920x1080.zip
* http://i1.pixiv.net/c/600x600/img-master/img/2014/10/02/13/51/23/46304396_p0_master1200.jpg
* http://www.pixiv.net/member_illust.php?mode=manga&illust_id=18557054
* http://www.pixiv.net/member_illust.php?mode=manga_big&illust_id=18557054&page=1
* http://www.pixiv.net/i/18557054
Rewrite old Pixiv small manga images correctly.

This prevents incorrectly rewriting these new Pixiv URLs:

* http://i1.pixiv.net/c/600x600/img-master/img/2014/09/24/23/25/08/46168376_p0_master1200.jpg
* http://i1.pixiv.net/img-original/img/2014/09/25/23/09/29/46183440_p0.jpg
Rewrite Pixiv small/medium images to full size images.

There are two kinds of thumbnails that need to be rewritten. First case:
new /img-master/ URLs need to be rewritten to /img-original/ URLs like this:

    http://i2.pixiv.net/c/600x600/img-master/img/2014/10/04/03/59/52/46337015_p0_master1200.jpg
    => http://i2.pixiv.net/img-original/img/2014/10/04/03/59/52/46337015_p0.png

This is what `rewrite_new_medium_images` does. In order to do this, it
has to use the Pixiv API to get the correct file extension.

Second case: Old small/medium size URLs need to be rewritten to full
size URLs like this:

    http://i2.pixiv.net/img18/img/evazion/14901720_m.png
    => http://i2.pixiv.net/img18/img/evazion/14901720.png

But when the medium size URL is actually for a manga image, it needs to be
rewritten to the big manga URL instead:

    http://i2.pixiv.net/img04/img/syounen_no_uta/46170939_m.jpg
    => http://i2.pixiv.net/img04/img/syounen_no_uta/46170939_big_p0.jpg

But we can't tell whether it's a manga image from the URL, so we have to
use the manga page count from either the HTML page or the API to
determine whether it's part of a manga gallery.

So in order to make this work, `rewrite_old_small_and_medium_images`
takes an `is_manga` flag. `Sources::Strategies::Pixiv#get` gets the
page count from the HTML and passes the `is_manga` flag on down through
the call chain until `rewrite_old_small_and_medium_images` gets it.

When `rewrite_old_small_and_medium_images` is called from
`Downloads::Strategies::Pixiv#rewrite_thumbnails`, the `is_manga` flag
isn't passed in because we didn't scrape the HTML. This causes
`rewrite_old_small_and_medium_images` to look it up in the API instead.
Use the normalized source in the upload form.

This makes it so you can use the bookmarklet to upload from any of these Pixiv pages:

* http://www.pixiv.net/member_illust.php?mode=medium&illust_id=45792845
* http://www.pixiv.net/member_illust.php?mode=big&illust_id=45792845
* http://www.pixiv.net/member_illust.php?mode=manga&illust_id=45792845
* http://www.pixiv.net/member_illust.php?mode=manga_big&illust_id=45792845&page=0

and the source field in the upload form will be filled in with the
actual image URL (e.g. http://i2.pixiv.net/img18/img/ringo78/45792845_big_p0.jpg),
and it will also be used for the "This post was already uploaded" check.
Make the artist finder work with new Pixiv URLs.
Make VCR disallow unexpected HTTP requests.

This makes it so that tests fail when they make HTTP requests they
aren't expected to. Update these tests so that they use VCR like they
should.
Rewrite tests for downloading new Pixiv URLs.

* Test that downloading the HTML page downloads the full size image
  instead.
* Test that downloading a small or medium size image downloads the
  full size instead.
* Test the above for both single illustrations and for manga galleries,
  for new and old posts (i.e. uploaded before the Pixiv URL changes versus
  after), and for different file extensions.
* Test trying to download ugoira zip files. These tests are expected to
  fail because we don't support ugoira yet.
* Also add some more tests for fetching source data.
Regenerate VCR cassettes for new tests.
Cache seiga and nijie sessions
Fix upload tests to use VCR.
Add artist finding tests for new Pixiv URLs.

* Add tests for finding artists using the new Pixiv URLs in Artist#find_all_by_url.
* Add tests for the artist finder JSON API in ArtistsController#finder.
* Add tests for the artist page search form in ArtistsController#index.
Refactor normalize_for_artist_finder!

Refactors things such that Sources::Site has a normalize_for_artist_finder!
method that delegates to the strategy for the appropriate site. This way
any site that needs to normalize URLs for the artist finder can do so.