Move OS-specific chunks into separate headers
Add rights manipulation in struct cap_rights to Linux version
Move Linux implementations into a C file