Buffer: some fast-path for find(...) and minor memory access bug fix
Buffer test improvements
Buffer: throw bad_alloc() on mem alloc errors (setCapacity)