Enabled -Wall and fixed warnings

After enabling -Wall, the warnings were fixed as follows:

o Defined _GNU_SOURCE for acess to fmemopen and pipe2.
o Added lots of casts to (const char *) for the sqlite3_?_text functions
o Fixed some bugs in exptbl.c
Merge branch 'fixwarnings20140617' into develop

Multiple fixes to address warnings after addtion of -Wall