Add an interface to Jadu's API

Use it like this (note that for Jadu's near-live system you'll need to
disable SSL verification because the certificate is incorrect):

    BASE_URL = 'https://etapi.nearlive.moj.fcos.jadu.net/api/1/'

    api = Jadu::API.new(
      BASE_URL,
      verify_mode: OpenSSL::SSL::VERIFY_NONE, # for near-live
      ssl_version: :TLSv1
    )

    puts api.new_claim(xml, 'example.pdf' => File.read('example.pdf')).body

    puts api.fgr_et_office('B5 4UU').body

The API returns a Net::HTTPResponse and does not perform any checking
as yet.
Parse response from Jadu API

Initialise the API:

    api = Jadu::API.new(
      'https://etapi.nearlive.moj.fcos.jadu.net/api/1/'
      verify_mode: OpenSSL::SSL::VERIFY_NONE, # skip verification in near-live
      ssl_version: :TLSv1
    )

Make a new claim request:

    response = api.new_claim(xml, 'example.pdf' => File.read('example.pdf'))

    response.ok? # => true
    response.to_hash # =>
      # {
      #   'feeGroupReference' => '991000185700',
      #   'status' => 'ok'
      # }
    response['status'] # => 'ok'
    response['feeGroupReference'] # => '991000185700'

Make an ET office request:

    response = api.fgr_et_office('B5 4UU')

    response.ok? # => true
    response.to_hash # =>
      # {
      #   'status' => 'ok',
      #   'fgr' => '131000203700',
      #   'ETOfficeCode' => 13,
      #   'ETOfficeName' => 'Birmingham',
      #   'ETOfficeAddress' => '...',
      #   'ETOfficeTelephone' => '0121 000 0000'
      # }
    response['fgr'] # => '131000203700'
Split out Jadu API into 1 file per class/spec
Sanitise filenames to suit the Jadu API
Don't generate multiple underlines together
WIP

- creating new file structures
- breaking down linkable sections into seperate files
updated footer linkis
Improve style a little
Rename do to perform in Jadu API

To avoid potential confusion with do … end in Ruby. I'd probably have
chosen send, but, well, that has a special meaning, too.
Merge pull request #392 from ministryofjustice/ui/footer-links

updated footer links
Merge pull request #384 from ministryofjustice/jadu-integration

Add an interface to Jadu's API

Initialise the API:

    api = Jadu::API.new(
      'https://etapi.nearlive.moj.fcos.jadu.net/api/1/'
      verify_mode: OpenSSL::SSL::VERIFY_NONE, # skip verification in near-live
      ssl_version: :TLSv1
    )

Make a new claim request:

    response = api.new_claim(xml, 'example.pdf' => File.read('example.pdf'))

    response.ok? # => true
    response.to_hash # =>
      # {
      #   'feeGroupReference' => '991000185700',
      #   'status' => 'ok'
      # }
    response['status'] # => 'ok'
    response['feeGroupReference'] # => '991000185700'

Make an ET office request:

    response = api.fgr_et_office('B5 4UU')

    response.ok? # => true
    response.to_hash # =>
      # {
      #   'status' => 'ok',
      #   'fgr' => '131000203700',
      #   'ETOfficeCode' => 13,
      #   'ETOfficeName' => 'Birmingham',
      #   'ETOfficeAddress' => '...',
      #   'ETOfficeTelephone' => '0121 000 0000'
      # }
    response['fgr'] # => '131000203700'

Also includes a utility class for sanitising filenames according to the API requirements:

    Jadu::API::FilenameSanitizer.sanitize('Wow! A filename!.pdf') # => 'Wow_A_filename.pdf'
Guide updates

Files are broken up like this to make the in page links.

Pretty much redone everything.
- new md files
- renamed old ones
- redone the tests
- change in the controller
- new locale entries for link text
extra line causing an issue?
using mixins
Tweaks

- Removing a section by combining two files
- Monor copy updates
- Cleaning after removing the sectiob
Use shorter application references

Length is currently set to 8 (hyphenated 4-4), which gives about a
trillion unique identifiers.

Instead of obfuscating the ID, the token is now randomly generated and
stored in the database.
Check for collisions when generating app refs

The expected number of applications in the system at any time is about
20,000. With an eight-digit base-32 reference, the probability of a
collision is about 0.000018. That's low, but it's high enuogh to worry.

Thus, we check against existing applications references and simply
generate another random reference if there is a collision. This does
still leave a race condition, in that two simultaneous applications
could generate the same reference. The probability of two simultaneous
generations colliding is one in a trillion, however.
Link updates

- updating the locale file with new ids
- links in the guide updated
- fixed headings to correct size
Simplify app ref generation

This works because 256^5 = 32^8. The downside is that we can't easily
generate different length references any more.
last few amends

Ready for code review and merge.