Deprecate Server.connect methods.

These are no longer required as Server objects can be created directly by the
constructors.
Hide Run constructors and pass workflows in as byte[].

Use a static Run.create method so that the constructors don't do loads of
network accesses.

Also, use byte[] to pass in workflows, not String, to avoid encoding issues.
Add configurable Content-Type parameter to Connection.upload

Previously everything that was uploaded was application/xml but we have other
types to upload now.
Change content param for Connection.upload to byte[].

This was using String but byte[] is clearly the correct type.

Also change the workflow upload to send the file directly rather than wrap it in
XML. The XML fragment for workflow uploading is removed as it is no longer
required.
Updates to the data/file upload code and API.

Uploading is now generalized to allow for raw data (byte[]) to be sent. The file
upload API also now uses this general code underneath.

All these methods, within the Server class, are now hidden to all classes
outside the package.
URIs passed as URI objects, not String objects.

All the connection methods took String URIs when they were full URIs so we now
use proper java.net.URI objects for these instead.

Updates here cut across all objects that manipulate URIs, including exceptions.
Update the versions of the Apache HTTPComponents libraries.

Both HTTPCore and HTTPClient are now at version 4.2.1.
More sensible manipulation of URI objects.

We need to do quite a bit of URI editing and munging in various places but URI
objects are immutable and the code to do this can be ugly/dodgy. Here a utility
class, URIUtils, is added (with tests) to do the required operations in one
place.
Expose the new Server data upload methods in Run.
Set/get baclava inputs/outputs as byte[].

The input method could only upload from a file and the output method returned a
String. Now both of these use byte[] and the file input method is retained.
Fix Run.isBaclavaIn() to actually check.

If baclava input is set then it remains set, but if a different process has got
the equivalent run (but a different object) it still needs to check with the
server as to what the situation is.
Fix Run.isBaclavaOut() to actually check.

If baclava output is set then it remains set, but if a different process has got
the equivalent run (but a different object) it still needs to check with the
server as to what the situation is.
Streamline Run constructors.

There were two constructors that did the same thing with different input
parameters. Repeated code removed.
Move to using JAXB to parse ISO8601 date-times.
Implement Run.setExpiry.

This uses JAXB to convert a Date object, via a Calendar object, to an ISO8601
date-time string.
Check for all inputs set before running.

Throw a runtime exception if any inputs are not set.
Remove Server.uploadFile(..) methods.

These are superceded by the uploadData method. The file interface is still used
within Run but calls Server.uploadData instead.
CustomSSLConnectionParams now accepts InputStream.

A certificate can now by passed in as an InputStream.
InputPort: Setting a remote filename should use String.

Was previously using File, which isn't totally wrong, but representing a remote
file as a virtual file object isn't necessary.
Add a method that uses InputStream for data uploads.

This allows for the underlying HTTP client code to stream the data if needs be.