multiple instances of resolver created

previously, only one instance of resolver was created and given to each
thread, now each thread creates its own resolver and hence it's own
connection to the database.

Added more command line arguments for the database settings.