Move from our own nested form code to the nested_form gem

Our nested/associated form code is messy and hard to understand. We're now
using the nested_form gem in need-o-tron so it seems worth trying it in
publisher too.

There are some regressions here that need further attention:
* this change removes the code that makes sure parts are sorted correctly
* We also replace the 'add new part' button with a link
* New guides appear without any parts by default
Remove old associated forms code
Remove old associated form javascript
Make programmes form support nested forms

It needs to be a semantic_nested_form_for in order to support the remove link
Remove unused Admin::EditionsHelper#setup_association
Add helper to set up a few form defaults

It actually feels like this should live in the controller or the model
but I've not worked out the best/least intrusive way to add it there
and this change at least gets the basics working.

There's one failing test in AddingPartsToGuidesTest that needs more
investigation.
Upgrade capybara and switch to poltergeist for browser simulation

It's good to be up to date, and poltergeist is usually faster than
capybara-webkit
Add new parts into the #parts section tag
Don't include javascript twice

Bad, confusing things happen
Update tests to use better targetted selectors

Recent changes have slightly altered the HTML we generate so the
tests needed ome changes to reflect that. We can also use the
assert_selector assertion to more explicitly verify a few steps.
Remove unnecessary call to collapse the accordion

bootstrap does that for us
Update to newer jquery API $.fn.live -> $.fn.on
More explicitly test behaviour of 'add new part' link
Remove unnecessary use of instance variable in test
Switch back to capybara-webkit

Poltergeist was throwing various issues about elements not being
visible which neither selenium nor capybara-webkit have a problem
with. Having tested with both of them and manually I'm confident
that the issue is with poltergeist
Updates to assertions

We were using 'assert_equal true' in quite a few places which can be
better stated as 'assert'. There are also a few other cleanups to make
the test code more succinct or flexible.
Whitespace
Merge branch 'master' into nested_form_gem

Conflicts:
	Gemfile.lock
Fix capybara-webkit at 0.12.1

Newer versions of capybara-webkit have a dependency
on a version of Qt not present on 10.04 boxes.
Replace assert_selector with 'assert page.has_css?'

The latter works in this version of capybara.