Removed int()-casts in XHR controller

Removed some int()-casts in the XHR controller as the backend handles
both (and we avoid double validations). Also added a few missing
int()-casts with validation in the backend.

Fixed #423
Merge branch 'xhr_pass_through'
Modified install instructions
added customer_id
Implement precalculation of number of children

This implements the calculation and storing of the number of children to
a prefix. Previously we did this calculation kind of on-the-fly when
returning search results but as it is a value that doesn't change much
it is well suited to being calculated beforehand and stored in the
database.

Together with this, a lot of database triggers have been refactored.
Most of the changes pertain to how and when triggers are called and not
their actual function. Instead of triggering children/tag/indent
calculation on all updates we are now using the column based triggers
available in PostgreSQL 9.x to only trigger on changes that would
influence the result. For example, changing the description of a prefix
would not change the indent and so there is no need to trigger indent
calculation on changes to the description column. There is a certain
risk of new bugs as the changes are quite extensive but the unittests
run without fault and I've gone through everything more than once ;)

Naturally, the web UI now uses the values it receives from the backend
on how many children a prefix has. There was quite a lot of logic to
handle guessing the amount of children which has now been removed.

Also clarify certain parts of country code integrity test and fix other
unittests.

Fixes #421.
Merge branch 'master' of github.com:SpriteLink/NIPAP
Merge branch 'master' of https://github.com/job/NIPAP into job-master
Add "customer" column to web UI and fix order

Order of columns in web UI is now the same as the CLI, ie node goes
before order.

Fixes #432.
Merge pull request #431 from plajjan/421-children

Implement precalculation of number of children
Merge pull request #429 from PiotrC/master

Modified install instructions
Display top-level prefixes instead of nothing

Modified the web UI to display top-level prefixes instead of nothing and
another link to the search help.

Fixes #419
Add option to include neighbors in prefix search

Neighbors to a matching hosts were previously always included in the
search result, regardless of the value of parents_depth and
children_depth. With this fix, neighboring hosts to a matching host is
only included when the include_neighbors option is set.

The web UI should include neighbors, so it has been modified to set
include_neighbors to True.

Also added a new test suite for testing the logic behind parents_depth /
children_depth and the new include_neighbors.

Fixes of #416.
Merge branch '416-include-neighbors'
Fix unittest for include_neighbors

Part of #416.
Add unittest for edit_prefix return values

This makes sure the return value for edit_prefix is what it should be.
Simplify _get_updated_rows as per #416

With the improved functionality that #416 brings, we can now remove some
of the logic we had to add to _get_updated_rows to return only rows that
have been touched by an edit.

Part of #416.
Restore CLI prefix search output

The output of a prefix listing in the CLI was inadvertently changed when
implementing #416. This restores the previous behaviour.
Update NEWS file for 0.23

New in this release is that the release is named... Gargamel.
We are going to go with (super) villains for naming our releases ;)
Merge branch 'prepare-0.23'
More preparations for 0.23

Forgot to add one post to the NEWS file.

Updated postinst script to expect new database schema version to be 3
and not 2.

Added functionality to set value for children column on old database
which currently lacks it.