Add Array#to_h

i implemented Array#to_h from Ruby2.1.