fix is_npc, add util.npc_is_valid, fix bugs

- is_npc and is_player should both return true for dPlayer/dNPC's
always, even if they aren't spawned.
- added util.npc_is_valid so people don't have to check if
server.list_npcs contains the NPC or other hackish solutions.
- Fixed some misdefined meta
- caught a potential bug in dEntity, better debug warning for it.
Handle null's in element.as_x better

Now with a proper debug message instead of giant stacktraces!
Also, fix some bad meta and inaccurate debugging.
Correct an off-by-one error in get_sub_items

Also add some meta.
[Internal] Make the property parser public

Quick mini-commit for use with Depenizen.
Merge pull request #679 from mcmonkey4eva/master

Pull request for slightly larger but still small fixes