samdb: Add flags argument to samdb_connect().