Added _cividiscount prefix to internal functions.
Fixed bug in manual registration that applied administrator automatic discount to invalid user.