My take on who pays for the pre-buy inspection is this:
You absolutely want the inspector to be acting 100% on your behalf, with only your interests in mind. If he's being paid by the seller, even partially, he's not acting solely as your agent.
As far as whether an inspection happens before or after an offer, it can go either way. It's certainly logical to base your offer on the outcome of of an inspection, it can also be done the other way, You agree on a price which is understood by both parties to be dependent on being found airworthy by the inspector, and that airworthiness issues are obviously goint to be points for further negotiation. Example, if the inspector finds a frayed control cable, the seller would have the option of having the cable replaced or adjusting the purchase price to reflect your cost to replace it. Now if the inspector finds major corrosion issues, you can walk away from the deal, because remember you and the buyer ageeed that sale was contingent on the aircraft being found airworthy.
The key is making sure that both parties understand clearly what the deal is. On the other hand, if the seller tells you up front that it is not airworthy, for example it has 3 cracked cylinders, he's going to be understandably reluctant to reduce the agreed upon price when your inspector "finds" the 3 cracked cylinders