[native/sqlite] introduce function to get database version
Summary: In the future there will be a need to get the database version in different places, that being said extracting logic to separate function.
Test Plan: Check if logged database version is propper (could be compared with user_version visible after connecting to the database).
Reviewers: marcin, jon, atul, tomek
Reviewed By: marcin, atul, tomek
Subscribers: ashoat, tomek, atul, abosh
Differential Revision: https://phab.comm.dev/D5375