Add SQLite3 support, closes #580
Release v4.0.6 [ci skip]