Fix build issues on BG/P.

When pthread is not found, ensure that VTK_SQLITE_THREADSAFE is set to 0. If
VTK_SQLITE_THREADSAFE is not defined, it was defaulting to 1 and we were never
setting VTK_SQLITE_THREADSAFE. This fixes that issue.

Change-Id: I80d2bc39de8db08d6c1db284a7c80869506bd2ee
Merge topic 'fix_bgl_xlc_build_issues' into master

8fe60489 Fix build issues on BG/P.