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
Handle teleporting properly

Player teleport events were firing weirdly... don't fire
EntityTeleportEvent when player's teleport ++ listen for player teleport
event. (Will fire automatically already)
Allow properties in the create command

- create entity[property=value] bob <player.location>
Works now :D
Add EntitySize property

- spawn slime[size=1]
Fix running delayed instant wait queues

- ~run script instantly delay:2s
A very weird thing to do... and now it works as it should! (Doesn't
finish the waitfor too early)
Also correct a meta typo
Add location.has_inventory, fixes #683

- Add a tag to check if the location has an inventory, copying the logic
from the function getInventory(), for use before reading
location.inventory
- Also, handle nulls appropriately in location.inventory to prevent
massive stacktraces
Add hit_entities def to the shoot command

Allows you to use and play with %hit_entities% if you shoot a mob.
See testing script here: http://mcmonkey4eva.dyndns.org/paste/1911
[Breaking] update npc.script

It returned an element because dScripts did not exist then... it will
now return 's@name' instead of just 'name' -- watch out, as this might
break scripts that use npc.script!
Merge pull request #682 from mcmonkey4eva/master

Pull request for slimey stuff
Add tag location.switched

For use with the switch command!
Fix determine in random command, fixes #684

The reqId is needed for determination... also, report the command
properly.
Handle bad dLoc tag input better

Massive stacktraces If you did something like <l@1,2,3,world.add>
Now handled appropriately.
Add some element util tags and escapes

- &dot escape to prevent tag parsing issues.
- element.index_of, element.last_index_of, element.char_at added as
element utilities.
Handle startup errors more cleanly

To prevent total system bugout if something fails to load at startup.
Unfortunately means startup errors are less likely to be noticed, but
it's worth it.
Add Server List Ping smart event

Fairly simple event, but with the potential to fire fairly often.
Added at user request.
Fix some minor tag errors, fixes #686

- element 'x' .after 'y' should return empty
- <el@whatever.after> with no context should be considered invalid, same
with before
- Escape code should not throw NPE's on null input
- books without author/title/pages (invalid books) shouldn't cause Book
property exceptions, and simply have their data be not saved.