Puffin - sort out 1 problem at a time as y have too many alignment issues going on at once. And the front end alignment/bar angle has a nothing to do with the rear sprocket.
It's hard to see from the pictures, but is the rear wheel assembled with the correct spacers? Does the rear wheel (rim) spin freely and without obstruction on the axle? Then, with a metal straight edge, align the outside faces of the sprockets. Maybe snap some clear pictures of your alignment marks on both sides?
For the front end, first thing I'd do is to release the tension on the triple trees and allow the forks to be adjusted. But, is the steering stem bent is my concern? This would show by rotating lock-to-lock and feeling for rough spots in the steering bearings, and leveling the underside of the lower and comparing it to the upper clamp.
Is your front rim (and rear for that matter) completely trued? Aligning a bike off a tire edge is far less accurate than off a disc, sprocket or other machined plane. So if you must;
1 - align drive sprocket.
2 - set up a string box outside the bike on both side. Square it with a tape measure.
3 - measure the offset from the outside string to the center of the tire, front and rear. This will tell you if the tire center lines are tracking straight.
Right now it's impossible to use frame measurements since you have suspicions that something/multiple things appear wrong.