Add tranges arg to Recording.codes()
Speed up and simplify CodeCorr calcuation