Structural and magnetic phase transitions in chromium nitride thin films grown by rf nitrogen plasma molecular beam epitaxy