list: added loop defintions to the list API.

Added the following loop definitions:

list_for_each:
	Loop through the linked list, forwards.

list_for_each_prev:
	Loop through the linked list, backwards.

list_for_each_safe:
	Loop through the linked list safely (i.e. it is safe to delete
	the 'current'/'carriage' node while looping).

list_for_each_prev_safe:
	Loop through the linked list safely (i.e. it is safe to delete
	the 'current'/'carriage' node while looping). Loops backwards
	through the list.

Signed-off-by: Michel Megens <dev@michelmegens.net>