Add allowed() function
The allowed() function checks if a given resource is free of consultation
or not.
Move common headers and declariations in lsd.h