bdev: Fix position of DEV_MAP

This rather important dictionary from constants to classes was hiding
between function definitions. The dict cannot go to the top of the file
as the classes haven't been defined there yet, so it's been pushed
to the bottom of the file.

For bonus points, the dict gets an epydoc docstring and a comment, too.
ComputeLDParams: do not spell out disk templates unnecessarily

A large part of the complexity in this function is due to the need
to translate from "template-specific" parameter names to
"template-agnostic" parameter names. This logic is complex and having
complex code for complex logic is okay.

However, for all other cases, the additional complexity is not needed.
Additionally this function would do the wrong thing silently for new,
unhandled disk templates by just not changing the resulting paramters.

This commit replaces the ad-hoc logic with a more generally useful
logic while leaving the DRBD code carefully alone.
PathJoin: improve error message when given one argument

PathJoin fails with an unclear message if only one argument is passed
to it. Calling PathJoin("/foo") causes this exception:

    Error: path joining resulted in different prefix (/foo != /foo)

However, /foo and /foo obviously share prefixes: what this function
really checks is that the resulting path should be inside the first
argument and, in that sense, /foo is not a "real" prefix of /foo.

Given that PathJoin already asserts that it received any arguments
at all, this commit discards the assertion for an error to be raised
if 0 or 1 arguments are received. The semantics don't change, but
the error message is clearer.
FileStorage: move to filesstorage.py

Move the FileStorage class in its own file, together with its helper
functions.
FileStorage: extract file logic to a FileDeviceHelper object

This will allow code reuse for Gluster through composition, rather
than inheritance.
netutils: Add ValidatePortNumber method

This method accepts a port number and checks that it is in fact valid.
Gluster: minimal implementation

Add Gluster to Ganeti by essentially cloning the shared file behaviour
everywhere in the code base.
Gluster: add GlusterVolume class

This commit teaches Gluster what a volume is and how to use it.
ssconf: Add Gluster mount directory

This commit adds the gluster storage directory to ssconf (without
actually using its value just yet).
Gluster: use ssconf value for mountpoint directory

Gluster still does not mount anything autonomously, but this commit
changes where Gluster expects its mountpoint to be.
Gluster: mount automatically

Add parameters to the Gluster disk template so Gluster can manage the
mount point point autonomously.
Gluster: add userspace access support

Add support for the QEMU gluster: protocol. Also change the access
mode routines so they check the access parameter for all templates.
Gluster: add the Shared File storage type.

The shared file and gluster disk templates should not report their disk
space information like file does, because they do not behave the same.

If a cluster pulls from the same, shared source of storage then it is
not correct, or useful, to report per-node disk availability, as the
information is not node-specific.

This change introduces the Shared File storage type for which no
per-node measuring of disk resources is made.
Gluster: announce in NEWS

Add the relevant line to NEWS
fixme? qa changes for gluster
DO NOT PUSH EVER - Disable annoying gnt-cluster verify orphan checking stuff.
fixup! Gluster: announce in NEWS