2) If your beast master pet would die as a ranger, there is literally a mechanic within 5e for this: "If the beast dies, you can obtain a new companion by spending 8 hours magically bonding with a beast that isn’t hostile to you and that meets the requirements." (the requirements being the following: "Choose a beast that is no larger than Medium and that has a challenge rating of 1/4 or lower") - both quotations are from PHB. Of course, I believe that a beast master companion should, like JandK mentioned above, be able to be resurrected in the same ways as regular party members - but there should be an option to tame a new creature if the pet perishes as this is listed as an available option according to the PHB.
A note on this - Every revision of ranger after the original PHB, every UA and revised ranger publication, have all contained an additional clause that allows the ranger to recall the spirit of a killed animal companion and return them to life, with a new body if necessary - using the same rules as the bonding ritual, but including a cost as well.
This is clearly the current intention, since it's been present in every UA and revision since the initial PHB, and I feel it's appropriate to be taken as legitimate here.