thumb.php: map b/c params prior to attempting redirection

This should fix most of the "No width specified" exceptions. I guess
most of this code will be rewritten to fix bug 56926, superseding this
patch, but I thought this might be a useful stopgap.

Bug: 56924
Change-Id: I5bcaaafc81e1e2a8a33819fa64790d5509dc6aa6
Merge "thumb.php: map b/c params prior to attempting redirection"