Yes, AC's check-in functions at PHL are handled by UA. I could be mistaken, but as PHL is one of the few stations where check-in isn't performed on AC's RES III system, you'll probably have to see an agent. If you're returning from CUN on AC, you can check in online for the departure from CUN.
The connection at YYZ is quick and easy. You do not need to claim checked baggage. Customs B was recently renamed "International Connections". Just follow the International Connections sign. You proceed through a very quick immigration check (you do need to complete the Canadian customs declaration you'll be given on board), and you'll be at the departure gate for the CUN flight within minutes.
If you return CUN-Canada-PHL on AC, procedures at the Canadian connection airport will be different. This is because you'll clear US customs before boarding your Canada-PHL flight.