future: Move the function in then/then_wrapped only once
future: Move the function in then/then_wrapped only once

Before this patch the function object passed to then is moved when
creating the lambda:

  schedule(fut.get_promise(), [func = std::forward<Func>(func)] ...

And when the lambda is moved into the continuation.

By having a continuation explicitly contain both the original function
object and a wrapper, we can move the original function object only
once.

This is a 0.7% reduction in the scylla text size. From 41492660 to
41799156.

Signed-off-by: Rafael Ávila de Espíndola <1975039f9046bf513b77c0c5639a0efc25f00e7f@scylladb.com>
Message-Id: <20200617184233.495941-1-1975039f9046bf513b77c0c5639a0efc25f00e7f@scylladb.com>

avikivity/seastar,avikivity/seastar,cloudius-systems/seastar,syuu1228/seastar,dreamsxin/seastar,scylladb/seastar,cloudius-systems/seastar,avikivity/seastar,dreamsxin/seastar,scylladb/seastar,dreamsxin/seastar,syuu1228/seastar,syuu1228/seastar,cloudius-systems/seastar,scylladb/seastar