Rotational diffusion and segmental motions in solutions and melts of tetraoctylammonium perchlorate