Avoid checking for loaded chunks for lighting and entity ticking.

When a chunk is loaded the server tries to ensure it has its initial light
calculations done before sending it to the player. When ticking entities
the server tries to ensure the entity does not walk into an unloaded chunk.
To accomplish these the server checks a one chunk radius around the chunk
to be lit or a two chunk radius around the chunk the entity is in. These
lookups happen every tick even though their result is unlikely to change
that often. To reduce the cost of these checks we replace them with a
system to keep track of what neighbor chunks a chunk has loaded and update
it when chunks load or unload which is a much less frequent action. On a
server with ten players this change removes about 100,000 calls a tick to
LongObjectHashMap's containsKey method.
Avoid unnecessary double chunk map lookups.

Several places in vanilla check if a chunk is loaded and if so get the
chunk. This is two effectively duplicate requests for one chunk. To avoid
this we add a new getChunkIfLoaded method and make use of it in high
traffic methods. There are other places that do these pairs of calls as well
but profiling did not show them getting called enough to be worth the diff.