Use loky.cpu_count() instead of os.cpu_count(). <!-- Thank you for contributing to Pyodide! All improvements are welcome,
     so don't be afraid to make a PR. -->

### Description

As discussed in https://github.com/pyodide/pyodide/pull/3559#issuecomment-1435965170

### Checklists

- [x] Add a [CHANGELOG](https://github.com/pyodide/pyodide/blob/main/docs/project/changelog.md) entry
- [x] Add / update tests

<!-- Bootstrap HTML for running the unit tests. -->
<!doctype html>
<html>
  <head>
    <title>pyodide</title>
    <script type="text/javascript">
      window.logs = [];
      console.log = function (message) {
        window.logs.push(message);
      };
      console.warn = function (message) {
        window.logs.push(message);
      };
      console.info = function (message) {
        window.logs.push(message);
      };
      console.error = function (message) {
        window.logs.push(message);
      };
      console.debug = function (message) {
        window.logs.push(message);
      };
    </script>
    <script src="./pyodide.js"></script>
  </head>
  <body></body>
</html>

<!-- Bootstrap HTML for running the unit tests. -->
<!doctype html>
<html>
  <head>
    <title>pyodide</title>
    <script type="text/javascript">
      window.logs = [];
      console.log = function (message) {
        window.logs.push(message);
      };
      console.warn = function (message) {
        window.logs.push(message);
      };
      console.info = function (message) {
        window.logs.push(message);
      };
      console.error = function (message) {
        window.logs.push(message);
      };
      console.debug = function (message) {
        window.logs.push(message);
      };
    </script>
    <script src="./pyodide.js"></script>
  </head>
  <body></body>
</html>
