header and library installation

* reverted changes: the resource type is not used for installation
module anymore (first part of the path is used instead of)
* headers are installed in separated stages (so they're installed only
once and they can be used several times)