[scalarproduct] Add constructor taking a shared_ptr<const Comm>
The parallel scalar product is useless without the communication. This MR makes it possible to construct a scalar product that manages the lifetime of it's communication.
Edited by Timo Koch