Testing Phase and Amplitude Variability in Functional Data Analysis: a Hierarchical Permutation Test Approach