Add output prompt support. Note: this is now in matplotlib trunk!
It's probably OK to keep it here for a while longer so sampledoc readers get
a functional, self-contained tool. But eventually we should stop shipping
it here, once mpl has a release with this.