Split Kernel#capture_output into its own extension.

It is not required for unit testing, and as such is more appropriate being written as an extension.