implemented is_connected()

is_connected() returns True if the graph is connected (if every node has a path to every other node) or False otherwise.