ECBackend: use std::swap for boost::optional

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 5daf53859c3baad706d04397037061726899f359)