Now using db data to generate our template!

Movie identifiers are now movieId instead of filename.

Template is now generated from collections in db, instead of hardcoded
"DVD", "BD" etc.

sqlite can now be run from multithreaded code.

ticket #3