Added the array subscript operator for vector.
Also added cbegin() and cend() API.
Also modified the get_base_gid_pair() to avoid
crashing of the program for invalid gid.