Where Did The Modern Toilet Come From?

The modern toilet is a technological marvel - where did it come from? And where does all our waste go?