Extract opened database cache code as mrn::DatabaseManager

Now, Groonga database is always created automatically if it doesn't
exist.