sqliterepo: new database close flags

Change-Id: I9fc7e6d3bd447dd4f00970cb9395d8dfbe7e391f
(cherry picked from commit ef108715df26f26146a21b6c8b22e2d9fedde2aa)
m1v2: optimize VNS_STATE by closing meta1 bases immediately

This is a modification I made a while ago, but that
wasn't merged. It limits meta1 memory usage while executing
REQ_M1_GET_VNS_STATE, and prevents the problem of memory
pages kept in cache by malloc.

Change-Id: Ie56abf4d2c2a3926bdf8ec143b7daa82f10021c6
(cherry picked from commit ec2f3192e5fb16f4d64e5b48abec719903783f8c)
sqliterepo,sqlx,m2v2: fix election problems after move.

Allow get_peers to bypass meta1 cache in sqlx and meta2v2.
Add SQLX_EXITELECTION request in sqlx-based services.

Conflicts:
	meta2v2/meta2_filters_action_url.c

Change-Id: Ife2760bc869376c3b793950fca2fa703ca23bec9
(cherry picked from commit 73d097744e95fe18d85e8b74537249aeed86117d)
sqliterepo: add forced meta1 decache in SQLX_RESYNC.

and fix small bugs.

Change-Id: I905f8dcb61c00b1e60c0e0b459bd27a4e0172cdf
(cherry picked from commit dd9912c8fd63b7c0b7c0147e3610e92facad0569)
redcurrant.spec: fix dependency to glib2 with Centos 6.6.

Change-Id: I57578198ba3c9797d97da66f2a4cabc408192b16
(cherry picked from commit dfa744bce51b97f2f9d705cb21b40f7793342d39)