TwoStepLogin: add issuer to otpauth URL

Modify the GoogleAuthenticator.getQRBarcodeURL method to also include an
issuer in the generated otpauth URL.

This helps users organize multiple entries in their GoogleAuthenticator app.

As per the recommendations at
https://code.google.com/p/google-authenticator/wiki/KeyUriFormat
the issuer is included both as a prefix to the username and as a query
string parameter.

The otpauth URL thus changes from:

    "otpauth://totp/testuser@vhr.test.edu.au?secret=" + secret

to

    "otpauth://totp/Issuer:testuser@vhr.test.edu.au?secret=" + secret + "&issuer=Issuer"

The issuer is now configurable in the application config as
    aaf.vhr.twosteplogin.issuer

The signature of GoogleAuthenticator.getQRBarcodeURL has been changed to
accept "String issuer" as an additional parameter.

The invocations of GoogleAuthenticator.getQRBarcodeURL  from
AccountController and LoginController have been changed to pull the
issuer from the config file - and if not set, pass null.
(Unfortunately, just passing the value directly breaks when the value is
not set - Grails complains about not find the method with the right
signature - as the returned (empty) object is of type ConfigObject)

The GoogleAuthenticator.getQRBarcodeURL method applies double URL
encoding to the value, as it is to be used as an encoded component of a
URL passed in encoded form to another URL.

The GoogleAuthenticator.getQRBarcodeURL method also handles null issuer
values, reverting to the original otpauth URL format.

Also, it was necessary to override the default encoding of spaces from
"+" to "%20", as a "+" in the issuer prefix of the username would not
get decoded back.

The unit tests have been updated accordingly to use the new method
signature and test for both blank and non-blank issuer values.

The sample config file has been updated with a snippet setting the
issuer value.

All tests passed.
Enhance proposed 2-Step usage of issuer

This code builds on the proposal submitted by Tuakiri for adding issuer to the generated QR code for 2-step logins.

The majority of the changes here are to bring key logic back into the Grails space, DRYing where possible and to ensure we avoid things like throwing RuntimeExceptions and printing full stack traces.

References code in Pull #181.
Refine extraction of issuer for 2-Step QR codes

As mentioned by @vladimir-mencl-eresearch the code between his commit and now incorrectly provided the issuer value for use with QR generation.

This commit ensures that double encoding is carried out refines the method name to ensure no surprise on part of the caller in getting an encoded value in response.

Test cases extended to ensure special characters are treated correctly.
Remove unused imports from previous revision
Merge pull request #184 from ausaccessfed/tuakiri-twostep-changes

Tuakiri twostep changes