Inline the buffer-size check parts of the standard scratch buffer
functions in a new inline file, include/buf.i.

Remove a couple of inlined buffer size tests, they're no longer needed.

Fix a few places to use __wt_buf_extend instead of rolling their own
versions.