The ROme OpTimistic Simulator: Core Internals and Programming Model