Has there ever been an commercial airplane with rear-facing seats?
Some airlines do offer rear facing seats in business/first class. However, this is more to save space than for increasing safety. For example, British Airways offers a mix of forward and backward facing seats in its business class.



Source: Forbes.com

BAC Hawker Siddeley Trident offered rear-facing seats while it was in service. (Note the visible cockpit). 



Source: airliners.net

Armed forces of a number of countries use rear facing seats, like the RAF and USN in their C-2 Greyhounds.



"C-2A interior DN-SD-03-16988" by Camera Operator: PH1(AW) Shawn P. Eklund, USN - US Defense Visual Information Center photo DN-SD-03-16988. Licensed under Public Domain via Commons.