OSDMap: pay attention to the temp_primary in _get_temp_osds

Switch _get_temp_osds to use pointers instead of references, and force callers
to check the out params instead of relying on a return code for if anything
was set (trying to use the return code when there are two possible outputs
does not provide useable semantics). For the new temp_primary out param, fill it
in from temp_primary if set, or from the pg_temp list if it's set, or leave
it blank if neither are.

Signed-off-by: Greg Farnum <greg@inktank.com>
OSDMap: move temp manipulation functions out of OSDMonitor

Signed-off-by: Greg Farnum <greg@inktank.com>
OSDMap: be more careful about clearing primary_temp

We need to compare the primary_temp to whichever listing we're actually
using -- the calculated set, or the pg_temp override. Otherwise we might
have a legitimate pg_temp and a primary_temp, but the primary_temp is
pointing at the calculated primary so it gets erased.

Signed-off-by: Greg Farnum <greg@inktank.com>
test: add an OSDMap unittest

This is not super-sophisticated, but it does basic mapping function
consistency checks and looks at the [pg|primary]_temp manipulations. If
we want to in the future, we can do these programmatically across a range
of pgids instead of just checking hash 0.

Signed-off-by: Greg Farnum <greg@inktank.com>