make Room class in a standalone module file

index.js contains more code for many purpose. To make index.js more clear, move class Room to a separate module. Thus, Room is more reusable and testable.