Improved the cursor creation api and changed vtgatev2 test to use cursor

api where possible.

@guoliang100 @enisoc @alainjobart