Key Matrix class functions optimized with "inline"

Key Matrix member functions, such as SetElement, GetElement and [] operator are now declared with "inline" keyword. This should increase the performance (at least a little bit).