As your leave expires two weeks before your ten years lawful residence, you can still make an application for indefinite leave to remain.
The rule allows you to make an indefinite leave to remain application within 28 days of your qualifying period i.e. ten year lawful residence periods.
The relevant rule for this is:
Applications being considered 28 days or less before the required qualifying period is completed
You can grant an application if it is considered 28 days or less before the applicant completes the required qualifying period, provided they meet all the other rules for long residence.
To apply for Tier 5 Youth Mobility, you need to return to Canada.
For your new employer to become licenced, I am afraid I cannot give a timescale on how long it takes as it depends on the organisation size and nature. But on average it can take 2-4 months for the sponsor license application.
Thank you for your question and I wish you all the best.
Please do not forget to rate my answer.