[buffer] refactor buffer_path_simplify (fixes #2560)
There actually was one bug: if the input consisted only of spaces,
it would read one byte too much.
`pre` was splitted into `pre2` and (already existing) `pre1` - the two
characters which were read before the current one in `c`.
Restructuring the loop eliminated some code before the loop, which was
similar to the one at the end of the loop.
From: Stefan Bühler <stbuehler@web.de>
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3120 152afb58-edef-0310-8abb-c4023f1b3aa9