**Describe the bug**
function groupArrayMovingSum() does not work with distributed tables, exception:
`DB::Exception: Unknown aggregate function movingXXX: while receiving packet from <host>:<port>.`

**How to reproduce**
run this sql
`SELECT groupArrayMovingSum(value)
FROM remote('127.0.0.{1,2}', system, metrics)
`

**Error message and/or stacktrace**
```
2020.07.17 19:27:58.741051 [ 26 ] {32972b12-8178-4964-9ce4-6c4eb1843087} <Error> executeQuery: Code: 63, e.displayText() = DB::Exception: Unknown aggregate function movingXXX: while receiving packet from 127.0.0.2:9000 (version 19.15.3.6 (official build)) (from 127.0.0.1:44162) (in query: SELECT groupArrayMovingSum(value) FROM remote('127.0.0.{1,2}', system, metrics)), Stack trace:

0. 0x55eb4248b640 StackTrace::StackTrace() /usr/bin/clickhouse
1. 0x55eb4248b415 DB::Exception::Exception(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) /usr/bin/clickhouse
2. 0x55eb421d88ca ? /usr/bin/clickhouse
3. 0x55eb4561a859 DB::AggregateFunctionFactory::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::shared_ptr<DB::IDataType const>, std::allocator<std::shared_ptr<DB::IDataType const> > > const&, std::vector<DB::Field, std::allocator<DB::Field> > const&, int) const /usr/bin/clickhouse
4. 0x55eb456bc81c ? /usr/bin/clickhouse
5. 0x55eb456bda95 std::_Function_handler<std::shared_ptr<DB::IDataType const> (std::shared_ptr<DB::IAST> const&), std::shared_ptr<DB::IDataType const> (*)(std::shared_ptr<DB::IAST> const&)>::_M_invoke(std::_Any_data const&, std::shared_ptr<DB::IAST> const&) /usr/bin/clickhouse
6. 0x55eb456d9062 DB::DataTypeFactory::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<DB::IAST> const&) const /usr/bin/clickhouse
7. 0x55eb456d97a4 DB::DataTypeFactory::get(std::shared_ptr<DB::IAST> const&) const /usr/bin/clickhouse
8. 0x55eb456d9925 DB::DataTypeFactory::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const /usr/bin/clickhouse
9. 0x55eb456a6567 DB::NativeBlockInputStream::readImpl() /usr/bin/clickhouse
10. 0x55eb45698d67 DB::IBlockInputStream::read() /usr/bin/clickhouse
11. 0x55eb45be9729 DB::Connection::receiveDataImpl(std::shared_ptr<DB::IBlockInputStream>&) /usr/bin/clickhouse
12. 0x55eb45bed845 DB::Connection::receivePacket() /usr/bin/clickhouse
13. 0x55eb45bff4ee DB::MultiplexedConnections::receivePacket() /usr/bin/clickhouse
14. 0x55eb456b00d6 DB::RemoteBlockInputStream::readImpl() /usr/bin/clickhouse
15. 0x55eb45698d67 DB::IBlockInputStream::read() /usr/bin/clickhouse
16. 0x55eb4580b5c2 DB::ParallelInputsProcessor<DB::UnionBlockInputStream::Handler>::loop(unsigned long) /usr/bin/clickhouse
17. 0x55eb4580bc85 DB::ParallelInputsProcessor<DB::UnionBlockInputStream::Handler>::thread(std::shared_ptr<DB::ThreadGroupStatus>, unsigned long) /usr/bin/clickhouse
18. 0x55eb4580c5fd ThreadFromGlobalPool::ThreadFromGlobalPool<void (DB::ParallelInputsProcessor<DB::UnionBlockInputStream::Handler>::*)(std::shared_ptr<DB::ThreadGroupStatus>, unsigned long), DB::ParallelInputsProcessor<DB::UnionBlockInputStream::Handler>*, std::shared_ptr<DB::ThreadGroupStatus>, unsigned long&>(void (DB::ParallelInputsProcessor<DB::UnionBlockInputStream::Handler>::*&&)(std::shared_ptr<DB::ThreadGroupStatus>, unsigned long), DB::ParallelInputsProcessor<DB::UnionBlockInputStream::Handler>*&&, std::shared_ptr<DB::ThreadGroupStatus>&&, unsigned long&)::{lambda()#1}::operator()() const /usr/bin/clickhouse
19. 0x55eb424d461c ThreadPoolImpl<std::thread>::worker(std::_List_iterator<std::thread>) /usr/bin/clickhouse
20. 0x55eb4819beb0 ? /usr/bin/clickhouse
21. 0x7f721a624e65 start_thread /usr/lib64/libpthread-2.17.so
22. 0x7f7219f4188d __clone /usr/lib64/libc-2.17.so
```
{
template <typename T, typename LimitNumberOfElements>
struct MovingSum
{
    using DataType = MovingSumData<T>;
    using Function = MovingImpl<T, LimitNumberOfElements, DataType>;
};
template <typename T, typename LimitNumberOfElements>
struct MovingAvg
{
    using DataType = MovingAvgData<T>;
    using Function = MovingImpl<T, LimitNumberOfElements, DataType>;
};
template <typename T, typename LimitNumberOfElements> using MovingSumTemplate = typename MovingSum<T, LimitNumberOfElements>::Function;
template <typename T, typename LimitNumberOfElements> using MovingAvgTemplate = typename MovingAvg<T, LimitNumberOfElements>::Function;
template <template <typename, typename> class Function, typename HasLimit, typename ... TArgs>
inline AggregateFunctionPtr createAggregateFunctionMovingImpl(const std::string & name, const DataTypePtr & argument_type, TArgs ... args)
{
    AggregateFunctionPtr res;
    if (isDecimal(argument_type))
        res.reset(createWithDecimalType<Function, HasLimit>(*argument_type, argument_type, std::forward<TArgs>(args)...));
    else
        res.reset(createWithNumericType<Function, HasLimit>(*argument_type, argument_type, std::forward<TArgs>(args)...));
    if (!res)
        throw Exception("Illegal type " + argument_type->getName() + " of argument for aggregate function " + name,
                        ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
    return res;
}
template <template <typename, typename> class Function>
AggregateFunctionPtr createAggregateFunctionMoving(const std::string & name, const DataTypes & argument_types, const Array & parameters)