Fix undefined behavior in rpc/server.cpp
Summary: Calling std::move() on command while dereferencing GetName() is undefined.
Test Plan: ninja check
Reviewers: deadalnix, Fabien, #bitcoin_abc
Reviewed By: deadalnix, Fabien, #bitcoin_abc
Subscribers: teamcity, schancel
Differential Revision: https://reviews.bitcoinabc.org/D2632