2. it is up to you. Where it is possible to book on different flight numbers, whichever you book on will determine the crediting rules and amounts. If you book the JL flight number , it will credit as per the JL earning table
It doesn't matter where you purchase from, just what the flight number is
3. It isn't because there is a codeshare offered, it is because you booked the AA flight number that it credited as AA