erasure-code: OSDMonitor::get_erasure_code is a const

If it is not, the non const version of OSDMap::get_erasure_code_profile
is called and a profile is created as a side effect, which is not
intended.

http://tracker.ceph.com/issues/8307 refs: #8307

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 3c638111a4943758b6089c63a42aabbf281ac257)
erasure-code: pool create must not create profiles

If a non existent profile is provided as an argument to osd pool create,
it must exit on error and not create the profile as a side effect.

http://tracker.ceph.com/issues/8307 refs: #8307

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit ff2eb234e63cd281b40405cb3397da5babda943f)
Merge pull request #1991 from dachary/wip-8307-erasure-code-profile-implicit-creation

erasure code profile implicit creation (firefly backport)

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>