Bug 10240 QA follow-up

Address the following issues:
    1/ Address minor qa issues with the templates:
     FAIL    koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline-mf.tt
      FAIL      forbidden patterns
                forbidden pattern: intranet-tmpl should certainly
                replaced with [% interface %] (line 24)
                [etc.]
     OK      tt_valid
     OK      valid_template

    FAIL    koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt
     FAIL      forbidden patterns
               forbidden pattern: intranet-tmpl should certainly
               replaced with [% interface %] (line 509)
               [etc.]
    FAIL      tt_valid
        lines 5, 5
    2/ Run perltidy on new scripts
    3/ download.pl returns data.finished = 1 if number of returned
       data < 5000 (avoids 1 ajax call)
    4/ Replace qq{} around sql queries with q{}

Also, a race condition existed that resulted in pending transactions
only getting deleted from the local database in certain circumstances
(fast connections under Chrome, mostly). This patch fixes that so that
successfully-uploaded transactions are always deleted.

This patch also addresses Jonathan's suggestion:
3/ add a message on check in (currently the input becomes empty but the
   user is not informed).

... and Magnus's suggestion about moving the Synchronize link to the
right on the homepage.

Finally, this patch adds a link to the Pending offline operations page
on the synchronize page for easier navigation.