future: Split then and then_impl to enable NRVO
future: Split then and then_impl to enable NRVO

GCC is currently not applying NRVO to then and then_impl, so the last
return:

return fut;

Is calling the move constructor. This changes splits the slow path out
of then and then_impl. In these simpler functions NRVO is used. The
result is that in

future<foo> bar(future<>* f) noexcept {
    return f->then([] {
        return foo(42);
    });
}

We go from 4 to 3 call to the foo move constructor.

The scylla text section is reduced by 1.3%, from 38714772 to 38206820
bytes.

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

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