* update R build and test script in petstore samples * update
* add generateWrapper option * fix bug, add tests * update doc