Added right and full outer joins

Exactly the same as PR #202 (thanks @Fire-Dragon-DoL) rebased and cleaned up to apply cleanly to master.