kernel: mem_slab: Optimize mem_slab_free

Changed algorithm of checking for pending thread in mem_slab.
Check for pending thread now is done only if there is
no memory left.

Signed-off-by: Kamil Lazowski <Kamil.Lazowski@nordicsemi.no>
1 file changed