Server: check for JSON booleans in object replace

This prevents JSON boolean values being converted into Taco
object references.
Server: add hash context for function calls

This is to avoid clients having to convert lists back to hashes
when calling functions or methods which return hashes directly.