Introduced two garbage collection mode: greedy and reluctant.
Introduced two garbage collection mode: greedy and reluctant.

The greedy GC mode attempts to erase as many sectors as possible, and
it is therefore a slow operation, since the flash driver must wait
for about a second after erasing one sector. The former behavior was
to always do a greedy GC if file reservations fails due to lack of space.

The new reluctant GC stops after erasing one sector, and therefore
we often do not have to wait if there is no file system operation
in the time while the sector is being erased. We call the garbage collector
using this mode when removing a file that is not a micro log file, since
the remove function is called recursively for micro log files that are
erased because the corresponding ordinary file is erased.

This change increases the coffee test (examples/sky/test-coffee.c) speed
from 9 to 5 seconds.

arurke/contiki,arurke/contiki,bluerover/6lbr,MohamedSeliem/contiki,bluerover/6lbr,bluerover/6lbr,arurke/contiki,arurke/contiki,MohamedSeliem/contiki,bluerover/6lbr,MohamedSeliem/contiki,MohamedSeliem/contiki,bluerover/6lbr,arurke/contiki,arurke/contiki,bluerover/6lbr,bluerover/6lbr,arurke/contiki,MohamedSeliem/contiki,MohamedSeliem/contiki,MohamedSeliem/contiki