SIGN IN SIGN UP

loader: Move schema loading into loader package

This commit moves the schema loading into the loader package so that
it can be reused. Also, the schema loading implementation has been
refactored a bit:

* Errors are more consistent with other loader errors
* Reduced a small amount of duplication on file reading
* Replaced a few nested blocks with early exits

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
T
Torin Sandall committed
0874895d55f4ef696c169a63e21dbbe0c8bebf80
Parent: 686e81d