Do not assume db and collection name is always atom. Allow binary.

In the erlang world, binary is first class citizen and atom's do not
scale for database or table names.

Currently passing in collection or table as an atom crashes at
atom_to_binary. Hence changed this to value_to_binary which solves
the issue gracefully.