Add list.h and declare function prototypes there.

Change the naming conventions of the public function to list_*