Residents of the Rockaways in Queens will be able to ride commuter rail for cheap — and the shuttle for free — while the MTA takes the A train out of service for four months of repairs next year.