Templates (part 1)

Updating the class declarations and implementations to support templated
parameters for vertices and edges. The internal structure is pretty much
exactly the same, but instead of being an int** array, it is an edge**
array. edge.distance provides the int value that would have been in the
adjacency matrix originally.