Allow pointing the bundled SQLite at a pre-fetched source tree.

netdata_bundle_sqlite3() is called unconditionally and drives an
ExternalProject_Add, which downloads at *build* time -- inside Portage's
network sandbox, where DNS is unavailable. This is a different mechanism
from FetchContent, so FETCHCONTENT_FULLY_DISCONNECTED does not cover it.

There is no upstream switch to use the system sqlite either: netdata also
compiles ext/recover/{sqlite3recover,dbdata}.c, which dev-db/sqlite does
not install.

So mirror what upstream already does for dlib (NETDATA_DLIB_SOURCE_PATH):
when NETDATA_SQLITE_SOURCE_PATH is set, use that tree as SOURCE_DIR and
disable the download step. Configure/build stay untouched and run
out-of-tree in sqlite-build; the amalgamation is generated by the jimsh
shipped in the SQLite source tree, so no TCL is needed.

--- a/packaging/cmake/Modules/NetdataSQLite.cmake
+++ b/packaging/cmake/Modules/NetdataSQLite.cmake
@@ -28,7 +28,11 @@
 
         file(MAKE_DIRECTORY "${sqlite_OUTPUT_DIR}")
 
-        if(SQLITE_USE_GIT)
+        if(NETDATA_SQLITE_SOURCE_PATH)
+                message(STATUS "Using local SQLite source tree: ${NETDATA_SQLITE_SOURCE_PATH}")
+                set(sqlite_SOURCE_DIR "${NETDATA_SQLITE_SOURCE_PATH}")
+                set(SQLITE_FETCH_ARGS DOWNLOAD_COMMAND "")
+        elseif(SQLITE_USE_GIT)
                 message(STATUS "Fetching SQLite via git clone")
                 set(SQLITE_FETCH_ARGS
                         GIT_REPOSITORY https://github.com/sqlite/sqlite.git
