[FIX] mail: more robust parsing of In-Reply-To/References (OPW 608919)

When parsing incoming messages, ignore white-space around
In-Reply-To headers, and extract message-id items inside
the References header using a regex.
This actually serves as a workaround for broken MTAs
mangling References (such as outlook.com nesting past ones
with commas, violating RFC2822).

Closes #516 as a manual rebase.
[REF] Packaging: moved all the windows-related files into an unique win32 directory + cleanup
[FIX] config.py: do not use appsdir to define the user's data dir when he has no home directory on unix

Force it to be '/var/lib/(appname)' in this case
[REF] Renamed files whose names contained whitespaces
[REF] setup: cleanup and linting of setup.py, reworked MANIFEST, added requirements.txt
[REF] Debian: renamed debhelpers scripts to not contain openerp in their filenames anymore, removed run_all_with_tests.sh script
[FIX] Debian: updated informations and dependencies, refactored debhelpers scripts to allow easy name change, simplified debhelper rules
[ADD] RedHat: defined the dependencies and added a post-install script to create the odoo user, the odoo configuration file, ...
[REF][FIX]: Windows packaging: lint, cleanup and make it work

setup.nsi: make it build and use postgresql 9.3
win32_se*: lint and simplified
Makefile: only one mode
[REF] Package.py: refactoring including cleanup, lint, and use of docker to test unix releases
[FIX] Windows packaging: correct Makefile.version writing and remove useless lib installation
[FIX] web: chain close action on wizard confirm

If a wizard has several steps, or laucnh a second wizard, the view from where has been loaded the initial wizard is finally reloaded
[IMP] Optimize the schedulers of the calendar, fetchmail and base_action_rules modules

Disable the the crons when they'd have nothing to do, re-enable them when a
task is (probably) introduced
[FIX] account_payment: lin2bank correct fallback condition
[IMP] web: extra comments to explain commit 57b4860

Added some cryptic comments so we remember a bit
why we have a complicated dance with on_close.
Basically we do not want to reload the
original form view until the last popup is closed,
in the case where several wizard (steps) are opened
one after the other.
[FIX] crm: avoid constraint errors when merging partners

As for the _update_foreign_keys, the _update_reference_fields method may raise an unique constraint when merging two partners.
In such case, the new record is not relevant and can be removed.
[IMP] website_forum: performance improvements

- avoid to browse on every question/answer, only the 20 most recent ones (need to manually update the view to see the real number of q&a)
- do not render hidden tabs (leakage of information and useless rendering)
- add related fields to speed up vote search (need to be stored to be efficient)
[FIX] website_forum_doc: default stage for post + removed unused import + added toc_id field in post tree view
[FIX] im_chat : forget part of sql request, and fix ambiguous column name
[IMP] survey: display sum for numerical answers