Make Vector methods const (where applicable), add unittest

This library could certainly use more regression testing! :-)