Move dependencies code to separate file.
Extend SQLiteCpp and SAM dependency cases to work when SQLite and SML are already present and force-build option is off.