Frederick of Nassau-Wiesbaden-Idstein, Canon of Mainz