Refactor locks for Scala.js to be based on Macro.noOperation for zero overhead