Internal friction controls active ciliary oscillations near the instability threshold