Fix inconsistencies in javascript API functions
I recommend a review of the functions in caosdb.js
as I noticed some inconsistencies that should be repaired and also reflect recent changes in the webui layout and design.
Specifically the logic of jquery and non-jquery interactions seems strange.
There should be type checking for the function arguments, e.g.: datatypes should only be retrievable for Properties, sizes, checksums and paths only for Files.