lib/os/heap: code cleanup
lib/os/heap: code cleanup

This makes the code cleaner wrt bucket_idx() usage on chunks for which
solo_free_header() is true. In such case the bucket_idx() computation
is useless, and potentially undefined anyway.

In the same vain, move the clearing of the used flag out of
free_chunks() as only one of its callers actually needs that.
Makes free_chunks singular as there is only one chunk (potentially
spanning multiple chunk units) to free.

Also some cosmetic changes for better code uniformity.

No functional changes.

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

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