Fix parsing for keyword & rest arg function types

Closes PR 14309
Fix keyword function type conversion in TR

Makes rest arguments work properly and handles
keywords passed in by sorted order.