update the package dependencies to the latest and also refactored the lib code to allow users to use mongoose plugins
update the code for the test and example to the latest