Secular Evolution of Hierarchical Planetary Systems