Optimize FD phi calculation
patch by jbellis; reviewed by brandonwilliams for CASSANDRA-6386