crush: unittest CrushWrapper::move_bucket

Signed-off-by: Loic Dachary <loic@dachary.org>
crush: remove redundant code from move_bucket

The following was introduced in 2012 by a2d0cff1b071bed84ac439e4fcf9ddfb936f89c8

  // un-set the device name so we can use add_item later
  build_rmap(name_map, name_rmap);
  name_map.erase(id);
  name_rmap.erase(id_name);

when insert_item refused to move a bucket for which a name already
exists. It was changed in 2013 by
4e2557a038dc1e8c68993ad8571d74e2eb8ea90a and now supports it. The
TestCrushWrapper unittest for move_bucket pass.

Signed-off-by: Loic Dachary <loic@dachary.org>
crush: remove obsolete comments from link_bucket

Probably copy/pasted from move_bucket.

Signed-off-by: Loic Dachary <loic@dachary.org>
crush: detach_bucket must test item >= 0 not > 0

Since detach_bucket is a private helper solely used by move_bucket which
contains another ( correct ) safeguard, the code cannot be reached and
the problem can never happen. If another function uses detach_bucket,
it may happen.

Signed-off-by: Loic Dachary <loic@dachary.org>
Merge pull request #913 from dachary/wip-crush-unittest

CrushWrapper::move_bucket unittest and minor fixes

Reviewed-by: Sage Weil <sage@inktank.com>