Improve backwards compatibility in Java std::vector wrappers

For users who have typemaps for the parameters in the add and set methods
(now called doAdd and doSet).
Also for users who have typemaps for the get method - revert the return
type for get (now called doGet) back to the same return type as
std::vector::at. Correct definitions of const_reference to match the
those in the (C++11) standard.
diff --git a/Lib/java/std_vector.i b/Lib/java/std_vector.i
index 88de46f..e332702 100644
--- a/Lib/java/std_vector.i
+++ b/Lib/java/std_vector.i
@@ -105,14 +105,14 @@
         return SWIG_VectorSize(self->size());
       }
 
-      void doAdd(const value_type& value) {
-        self->push_back(value);
+      void doAdd(const value_type& x) {
+        self->push_back(x);
       }
 
-      void doAdd(jint index, const value_type& value) throw (std::out_of_range) {
+      void doAdd(jint index, const value_type& x) throw (std::out_of_range) {
         jint size = static_cast<jint>(self->size());
         if (0 <= index && index <= size) {
-          self->insert(self->begin() + index, value);
+          self->insert(self->begin() + index, x);
         } else {
           throw std::out_of_range("vector index out of range");
         }
@@ -129,7 +129,7 @@
         }
       }
 
-      CONST_REFERENCE doGet(jint index) throw (std::out_of_range) {
+      const_reference doGet(jint index) throw (std::out_of_range) {
         jint size = static_cast<jint>(self->size());
         if (index >= 0 && index < size)
           return (*self)[index];
@@ -137,11 +137,11 @@
           throw std::out_of_range("vector index out of range");
       }
 
-      value_type doSet(jint index, const value_type& value) throw (std::out_of_range) {
+      value_type doSet(jint index, const value_type& val) throw (std::out_of_range) {
         jint size = static_cast<jint>(self->size());
         if (index >= 0 && index < size) {
           CTYPE const old_value = (*self)[index];
-          (*self)[index] = value;
+          (*self)[index] = val;
           return old_value;
         }
         else
@@ -169,7 +169,7 @@
 namespace std {
 
     template<class T> class vector {
-        SWIG_STD_VECTOR_MINIMUM_INTERNAL(T, const T&)
+        SWIG_STD_VECTOR_MINIMUM_INTERNAL(T, const value_type&)
     };
 
     // bool specialization