Electrochemical and Photophysical Properties of Ruthenium(II) Bipyridyl Complexes with Pendant Alkanethiol Chains in Solution and Anchored to Metal Surfaces