Fix potential SIGSEGV when there's no dot char in the namespace

This PR fixes these issues:

1. Fix the SIGSEGV issue when there's no dot char in the namespace passed to `mongo_create_index` api 
2. Check the return value when try to create index after the `mongo_insert` operation 

These fixes will be useful especially when someone try to use this driver to write some long running services for example: MongoDB Proxy....