file: close: do not allocate
file: close: do not allocate

There is no need for do_with(shared_ptr<file_impl>(_file_impl)).

do_with allocates its state and if it fails to do so
_file_impl->close() will not be called.

Instead, just move _file_impl into a local variable
and capture it in a continuation.

Although we could in theory rely on the _file_impl
being kept valid by the file object, we currently allow
closing the file_impl in the background while the file
object is destroyed and this shouldn't be changed.

Signed-off-by: Benny Halevy <23c997c90eb8537635e9392d48e7af1bf1b2ca22@scylladb.com>

syuu1228/seastar,avikivity/seastar,scylladb/seastar,scylladb/seastar,avikivity/seastar,syuu1228/seastar,scylladb/seastar,avikivity/seastar,syuu1228/seastar