As far as I've seen it, and we played it in our campaign, the ship comes back with:
1. All damage repaired
2. All crew repaired
3. CQ as it was at the end of the battle. So if the CQ was reduced by being skeletoned then it stays reduced (I'm assuming this is reflective of there being enough of the old crew still alive to continue letting the side down!)
4. Any traits/upgrades the ship had are still present.
Cheers,
Iain.