Dynamically get the proper pagesize
Update to sqlite 3.8.7
As stated by upstream disabling thread safety in sqlite improve perfs