The eldest son of Norway's crown princess has appeared in court after being arrested on suspicion of rape.