APE: Faster and Longer Context-Augmented Generation via Adaptive Parallel Encoding