Added a task to verify tokens with.
Be more consisent with production use.

Reading the password from property files is best.
Added an issue-jwt task

This both helps us check the infrastructure and also opens the door
to more powerful token based authentication.
For some reason these files were missing from an earlier commit.

Adds mechanisms for generating tokens. And an ant-task to check that.
Removed some unnecessary imports.
Add preconfiguration for wso2 subject claims.
Documentation fixes.
Some rethinking of the FriendlyMines infrastructure

The changes here are designed to make the friendly mines system more
stable, generic and maintainable, and introduce some architecture into a
system that had grown organically.

It does a number of things, including:
  * make sure messages passed over the DWR boundary are typed
  * Provide a proper API for extensions (also well typed).
  * Removed many hard coded dependencies (class names, bio jargon).
  * Use OO inversion of control to limit responsibilities (for
    example, the Mine objects are now responsible for running
    their own queries, which they do differently depending on whether
    they are local or remote - this is instead of an outside runner
    that used many if statements; another example is moving caching up
    to the appropriate, ie outer, layer).
  * Tidied up the JS code so that it is more likely to be understood and
    maintained in the future.
Ignore artefacts of the script to download and configure tomcat.
Update script so that is works on Macs
Some safety and sanity changes for the setup script.
More safety checks - here for software dependencies.
This change was needed to get the project to compile.

Without it the build failed saying it couldn't convert Object to String.
Made sed usage more portable.
Added script to initialise a workspace.

Currently failing since the api tests seem to need testmodel.properties.
Better compatibility with POSIX shells.
Now working much better - runs all tasks correctly
Some work to make JWTs easier to use.

These changes enable the following features:
  * trusted public keys can be provided in properties files (base-64 encoded)
    these should live in ~/.intermine/MINE.properties. These should take
    the form:

       security.publickey.ALIAS = BASE64ENCODEDKEY

  * Different strategies can be used to simplify configuration. The
    following strategies are supported (provided as values of the config
    property 'jwt.verification.strategy'):
     - NAMED_ALIAS: the default - issuer names must be explicitly mapped
       to key-store aliases using 'security.keystore.alias.$ISS'
       property values. Only pre-screened JWT issuers are allowed.
     - ANY: If the signature can be verified with any certificate in the
       key-store, all of which will be tried in a loop. This
       strategy is best when there is only one or two public keys
       supplied in property files. It requires all of the entries
       in the keystore to be suitable for verification.
     - WHITELIST: Similar to ANY, but only a whitelisted set of key
       store entries are used to verify the token's signature. This
       requires the set of entry names to be known in advance. The
       whitelist is read from the config property 'jwt.alias.whitelist'.
Some work on tests and things like checkstyle

Adds tests for new code. Also includes some refactoring. Now with more
reusable chunks of functionality! Most things are mockable now and there
is very little difused knowledge of internal implementation details.
Added test for KeyStoreBuilder

fixing bug in the process