Fix test suite for children

Copied the test for statistics test, which is the most comprehensive
test written thus far and added yet another case. Found one case where
the test suite tested for incorrect results, which I fixed.

Also add the one extra case to the statistics test suite for
completeness.

Part of #518.
Merge pull request #545 from plajjan/518-children-calc

Fix test suite for children

Fixes #518
Add index on pool_id

This will speed up listing of large pools.

Fixes #497.
Merge pull request #546 from plajjan/497-add-pool_id-index

Add index on pool_id
Add test case for tag inheritance

This reproduces the problem in #519.

Part of #519.
Fix tag inheritance

The big after trigger on the ip_net_plan table didn't trigger on changes
to the tag or inherited_tags column which broke tag inheritance. Now
fixed!

Fixes #519.
Merge pull request #547 from plajjan/519-tag-inheritance

Fix tag inheritance
Update NEWS file for version 0.26 - Iron Man
Fix nipap-passwd traceback

Missing configuration file no longer throws a traceback.

Fixes #548.
Merge pull request #549 from plajjan/548-fix-nipap-passwd

Fix nipap-passwd traceback
Rework of debian install scripts

This should fix the issues that we've seen with an upgrade of nipapd
leading to a wipe of the configuration. The issue was that the
installation scripts (config & postinst) determined whether it was an
upgrade or fresh installation based on if we could find the 'nipap'
database in PostgreSQL. Along with NIPAP v0.25 a new patch release of
PostgreSQL was released and when debian is upgrading both nipap and
postgresql at the same time it will stop postgresql to perform the
upgrades. Since we relied on postgresql running to determine whether it
was an upgrade or fresh install we would take the wrong decision and
presume it was a fresh install which includes writing a new
configuration with a randomized password and so forth. Chaos ensued.

With this modification we check that Postgres is running before
proceeding which should fix the issue.

Some of the logic has been moved around between the config and postinst
script. In essence, all logic should be kept in the config file while
the actual installation actions are performed in postinst. It's hard to
do this in reality but this is a step in the right direction. Now all
error messages are printed to stderr from postinst instead of using
db_input to display messages which is also the right thing to do.

Fixes #496.
Merge pull request #550 from plajjan/496-fix-debian-install

Rework of debian install scripts
Update NEWS file and bump version number

We are getting ready for v0.26!
Move icons to avoid Apache conf clash

On a lot of distributions Apache comes with an alias for /icons to point
to a system-wide directory, thus having a site-local /icons should be
avoided. The content of our /icons folder has been moved to /images.

Fixes #551.
Update news and bump to v0.26.1

Annoyingly small fix.
Fix Chart.JS setup for pools

The canvas is only included if pool has members of given address family
but we always tried to draw to the canvas (which didn't exist if there
were no members). This resulted in a JavaScript error and if the pool
contained IPv6 prefixes but no IPv4 prefixes, the chart for IPv6
wouldn't be drawn. This change fixes that.

I would like to move all of this to JavaScript on the client side
instead of mixing up server side Jinja2 with Javascript, but that will
probably come once we migrate these pages to AngularJS.

Fixes #552.
Merge pull request #554 from plajjan/552-fix-chart

Fix Chart.JS setup for pools
Correct statistics for pool

Calculation of percentage of used addresses has been way off as 'used /
free' was used rather than 'used / total'. Don't know how that got in
there - brainfart probably :(

Fixes #553.
Merge pull request #555 from plajjan/553-fix-pool-stats

Correct statistics for pool
Fix stats calculation in web UI

We previously took care of this on the pool page but the error was
present on the prefix and VRF page too, which is now fixed!

Truly fixes #553.