Local View refactor (split off from layers)
Goal of this patch was to split local view storage off from layer bit-field, preparing for the layer manager changes of my GSoC project. It also includes some general refactoring for local view code.
Up to 32 local views are now supported, otherwise no changes should be visible for users.
Local view is now mostly handled through an API located in BKE_localview.h (inline functions). Just like the old one, this new system also uses bitfields, wrapped by a struct LocalViewInfo to make possible future changes easier. Ideally, I'd like to have the LocalViewInfo struct local, so devs are forced to use the API, but it needs to be on DNA level for file read/write.
Still need to check on RNA, Cycles and dependency graph.