Update to credit handling

Add setcredit function to prevent out-of-bounds credit settings at any
point.

GLUA changes to player credits now use shell functions with bounds
checking.