dm thin: make use of block_size_is_power_of_two to make code clearer

Use rather block_size_is_power_of_two() than checking
sectors_per_block_shift directly.  Also introduce local pool variable in
get_bio_block() to eliminate redundant tc->pool dereferences.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
dm thin: add proper support for a non power of 2 discard_granularity

Simplify how the thin target establishes discard_granularity now that
the block layer does support a non power of 2 discard_granularity (via
8dd2cb7e880d2f77fba53b523c99133ad5054cfd "block: discard granularity
might not be power of 2" and 59771079c18c44e39106f0f30054025acafadb41
"blk: avoid divide-by-zero with zero discard granularity").

Signed-off-by: Mike Snitzer <snitzer@redhat.com>