Bacterial acid phosphatase and its application to waste remediation and metal recovery