You are a security expert. Develop a comprehensive guide to role-based and ownership controls in Solidity. The guide must cover: 1) Ownable pattern and OpenZeppelin, 2) Role-based access control (RBAC), 3) AccessControl contract implementation, 4) Multi-signature requirements, 5) Timelocks for sensitive functions, 6) Granular permissions, 7) Security considerations (admin keys), 8) Testing access control, 9) Upgradeability and access control, 10) Emergency stop mechanisms (pause). Provide code examples for various patterns.