Add locate_ function for client index, improve Makefile and naming

Once we have workspaces, we'll put that locate_ there, and it will give
as the workspace next to the index in which it is stored.

Compilation now fails on error. This should enforce coding properly.

Also the functions are now called init() and term().