mempool: remove redundant bit set/clear within loops
mempool: remove redundant bit set/clear within loops

When small blocks are recombined to create a single block at a shallower
level, it is sufficient to remove those blocks from the free list. There
is no need to mark those small blocks as allocated in the bitmap.

This, in turn, removes the need to mark small blocks back as unallocated
when splitting up a big blocks as they'll already be so marked.
Only the first small block needs to be marked allocated and the
remaining blocks only need to be added to the free list.

This makes the code smaller and more efficient, especially since those
removed bit manipulations were located within loops.

Signed-off-by: Nicolas Pitre <76342682d5afc62854e1102d9578521fe1ed6813@baylibre.com>

finikorg/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,Vudentz/zephyr,galak/zephyr,nashif/zephyr,galak/zephyr,galak/zephyr,nashif/zephyr,galak/zephyr,finikorg/zephyr,Vudentz/zephyr,Vudentz/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,finikorg/zephyr,finikorg/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,Vudentz/zephyr,Vudentz/zephyr