Move RevSpec#From and RevSpec#To to struct methods.
Add simple test for `rev-parse HEAD`.