common: create directory structure for rpmbuild

rpmbuild version 4.4.2.3 requires to create directory
structure before invoking when _topdir is defined.

Fixes: pmem/issues#3
Merge pull request #22 from plebioda/fix-make-rpm-on-sles11sp3

common: create directory structure for rpmbuild
blk: align ZERO and ERROR bit defs with spec

Thanks to alert reader @stellarhopper for this one!
common: fix _FORTIFY_SOURCE redefinition error

On Gentoo _FORTIFY_SOURCE=2 is defined by default so passing
-D_FORTIFY_SOURCE=2 causes error. Undefining _FORTIFY_SOURCE
and then defining fixes the problem.
Merge pull request #23 from plebioda/fix-fortify-source-on-gentoo

common: fix _FORTIFY_SOURCE redefinition error
nit: make .gitattributes safe for images
vmem: modify vmem benchmark, modify makefiles

The mt benchmark has been renamed to vmem_mt. The possibility of creating
pools in a directory has been added. Slight modifications to Makefiles.
Small vmem_valgrind test changes.
vmem: fix possible valgrind test match errors and valgrind version check
Merge pull request #20 from tomaszkapela/VMEM-benchmark-modification

vmem: modify vmem benchmark, modify makefiles
common: search for trailing whitespaces

Add searching for trailing whitespaces in README, Makefile*
and TEST* files to the top-level Makefile, because cstyle
looks for trailing whitespaces only in C source files.

[@andyrudoff tweaked this to fail the make if errors are found.]
Merge branch 'ldorau-common-search-for-trailing-whitespaces'
common: terminate build-*.sh scripts if any error
Merge pull request #25 from plebioda/terminate-building-pkg-on-error

common: terminate build-*.sh scripts if any error
vmem: fix pages purging for file mapped memory

Madvise system call with MADV_DONTNEED does _not_
fill pages with zeroes when memory is mapped to underlying file.
See madvice(2) for details.

pages_purge() function was saying that memory region has been zeroed
after calling madvice with MADV_DONTNEED - which was _not_ true.
This was causing an assertion fault because the page's meta-data was
invalid.

To fix this issue:
Return proper value in pages_purge() in order to set proper flag in
internal metadata. For file mapped memory pages_purge() does not
zero-fill pages. Only pool with id number 0 is anonymously mapped - pages are
filled with zeros.