State service

Added a state service to handle application state.
Updated sdPagination and sdSort directives to use state service.