Create .gitignore

This .gitignore file ignores every file which is removed by "make clean"
Update contrib.
Bump module versions for release.
Update Changelog and VERSION for release.
Fix parallel build of the policy

Before this commit, "make -j2" would execute twice at the same time the rules
written to build tmp/all_post.conf because these rules were applied every time
tmp/all_post.conf, tmp/all_attrs_types.conf and tmp/only_te_rules.conf needed
to be built. However, executing twice in parallel such line is buggy:

    $(GREP) '^fs_use_(xattr|task|trans)' $(tmpdir)/all_te_files.conf >> \
        tmpdir)/all_post.conf

This is why "make" reports following error for parallel builds:

    Compiling refpolicy-patched base module
    /usr/bin/checkmodule -M -U allow base.conf -o tmp/base.mod
    /usr/bin/checkmodule:  loading policy configuration from base.conf
    policy/modules/kernel/ubac.te":710:ERROR 'syntax error' at token
    'fs_use_trans' on line 26520:
    fs_use_trans devtmpfs system_u:object_r:device_t:s0;

    /usr/bin/checkmodule:  error(s) encountered while parsing configuration
    make: *** [tmp/base.mod] Error 1

This commit fixes this bug by splitting the rules in 3 different targets, in
both monolithic and modular builds.
Add two postgresql file contexts from gentoo policy

Gentoo appends version numbers to the names of the init script and the
config directory.
Whitespace fix in postgresql.fc
Module version bump for postgresql fc entries from Luis Ressel.
Add symlink to contrib Changelog for easy reference.
Properly label git-shell and other git commands for Debian
Label /usr/sbin/lightdm as xdm_exec_t

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739163
Move lightdm line in xserver.fc.
Whitespace fix in xserver.fc.
Update contrib.
Make scripts compatible with Python 3

Here are all the changes which are needed to make the script compatible with
Python 3 while keeping compatibility with Python 2.6 and 2.7:

* use subprocess module instead of commands,
* use sys.maxsize instead of sys.maxint,
* use print as a function,
* use "as" keyword in except statements.
fc_sort: fix typos in comments
fc_sort: initialize allocated memory to fix execution on an empty file

When running fc_sort on an empty context file, this program uses uninitialized
pointers when accessing to the elements of a list.  On my system, it goes in a
very long loop (maybe infinite) because unitialized field in malloc'ed structs
happen to contain valid pointers in the heap.

This patch fixes this bug by initializing ->next and ->data fields before they
may be read.
fc_sort: make outfile argument an option

When working on fc_sort to try to understand why using /usr/s?bin/... file
contexts has been reported not to work properly [1], I found it frustating not
to be able to do "tmp/fc_sort my_filecontexts.fc" and see the result printed
on the screen.  This patch implements this behavior by making optional the
second argument of fc_sort.

[1] commit 36e2216f8 of contrib repository,
http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=36e2216f82192660d063012e69281f27ba20864b
userdomain: no longer allow unprivileged users to read kernel symbols

Unprivileged users don't need to read kallsyms and /boot/System.map.

This allow rule was introduced in the initial revision of userdomain.if in
2005, with commit b16c6b8c32a631a2e66265f6f60b664222760972:

    # cjp: why?
    bootloader_read_kernel_symbol_table($1_t)
Add fcontext for syslog-ng pidfile