Source code refactoring. Extracted out common functionalities into merged functions .

Fixed errors

Source Code refactoring

Summary: Identified common functionalities in a couple of methods and created merged wrappers

Test Plan: N/A

Reviewers: yhchiang

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D30159

Fixed LINT issues

Added comment pointing to merged method

Forgot to save fixed lint files . Saving them before commiting

Fixed last LINT warnings, space after If and also name of new function reduced to be less than 80 characters

Extracted the status variable s out of the if branch

Fixed further LINT issues

Removed changes to memenv.cc and ldb_command.cc

Fixed further LINT issues

Merged conflicts with Rocksjni.cc
Merge branch '3.9.fb' of https://github.com/krishnanm86/rocksdb into 3.9.fb