Check hasVertex() from within add[Directed]Edge().

This is redundant with what's done in addVertex(), but makes it easier
if edge processing is done in a subclass' addVertex implementation.
OutOfRangeException -> OutOfBoundsException for missing vertex.