Restructured RestKit integration and extracted common parts to Core.