Gravar-mail: Generalized Optimized Effective Potential for Orbital Functionals and Self-Consistent Calculation of Random Phase Approximations