Simplified and improved handling of query string values in redirect

2-d array values like A[B][C]=D now get handled correctly, thanks to the
use of http_build_query().

Change-Id: Ic36f62d3476843e02d6bc383e169b41170be2376
Merge "Simplified and improved handling of query string values in redirect"